Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liraim committed Jul 28, 2022
1 parent 4346cf8 commit 9b8e565
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/evidently/tests/classification_performance_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def get_value(self, result: DatasetClassificationPerformanceMetrics):

def get_description(self, value: Numeric) -> str:
if value is None:
return "ot enough data to calculate Logarithmic Loss. Consider providing probabilities instead of labels."
return "Not enough data to calculate Logarithmic Loss. Consider providing probabilities instead of labels."

else:
return f" Logarithmic Loss is {value:.3g}. Test Threshold is {self.get_condition()}"
Expand Down
6 changes: 4 additions & 2 deletions tests/tests/test_classification_performance_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ def test_log_loss_test_cannot_calculate_log_loss() -> None:
suite.run(current_data=test_dataset, reference_data=None, column_mapping=column_mapping)
assert not suite
test_info = suite.as_dict()["tests"][0]
assert test_info["description"] == "No log loss value for the data"
assert test_info["description"] == "Not enough data to calculate Logarithmic Loss." \
" Consider providing probabilities instead of labels."
assert test_info["status"] == "ERROR"


Expand Down Expand Up @@ -282,7 +283,8 @@ def test_roc_auc_test_cannot_calculate_roc_auc() -> None:
suite.run(current_data=test_dataset, reference_data=None, column_mapping=column_mapping)
assert not suite
test_info = suite.as_dict()["tests"][0]
assert test_info["description"] == "No ROC AUC Score value for the data"
assert test_info["description"] == "Not enough data to calculate ROC AUC." \
" Consider providing probabilities instead of labels."
assert test_info["status"] == "ERROR"


Expand Down

0 comments on commit 9b8e565

Please sign in to comment.