Skip to content

Commit 54911b2

Browse files
add case in print_accuracy_metrics() in which accuracy metrics are None type (#236)
1 parent ba89f58 commit 54911b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def summarize_accuracy(self) -> dict:
5454
def print_accuracy_metrics(self) -> dict:
5555
accuracy_results = self.summarize_accuracy()
5656
assert type(accuracy_results) is dict
57-
if len(accuracy_results) == 0:
58-
print_warning_message("Accuracy metrics not available.")
57+
if len(accuracy_results) == 0 or None in accuracy_results.values():
58+
print_warning_message("Accuracy metrics are unavailable.")
5959
else:
6060
max_len = 14
6161
indent = 2 * " "

0 commit comments

Comments
 (0)