Skip to content

Commit 46798d2

Browse files
committed
fixed metric test
1 parent 0ebaced commit 46798d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ def test_accuracy():
9494

9595
accuracy_score = accuracy(y_true, y_pred)
9696

97-
assert accuracy_score.allclose(torch.tensor(0.8), atol=1e-5), (
97+
assert (torch.abs(torch.tensor(accuracy_score - 0.8)) < 1e-5), (
9898
f"Accuracy Score: {accuracy_score.item()}"
9999
)

0 commit comments

Comments
 (0)