Skip to content

Commit 2db5365

Browse files
committed
fix sonar complaints
1 parent d2fdd1f commit 2db5365

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

giskard/core/model_validation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def validate_classification_threshold_label(
245245
)
246246

247247
if classification_threshold is not None:
248-
if classification_threshold != 0.5 and len(classification_labels) != 2:
248+
if not np.isclose(classification_threshold, 0.5, rtol=1e-09, atol=1e-09) and len(classification_labels) != 2:
249249
raise ValueError(
250250
f"Invalid classification_threshold parameter: {classification_threshold} value is applicable "
251251
f"only for binary classification. "

0 commit comments

Comments
 (0)