Skip to content

Commit 2accbe4

Browse files
committed
Update recall test for new structure
1 parent 2be6ccf commit 2accbe4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_metrics.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ def test_recall():
5959
recall_micro = Recall(7)
6060
recall_macro = Recall(7, macro_averaging=True)
6161

62-
recall_micro_score = recall_micro(y_true, logits)
63-
recall_macro_score = recall_macro(y_true, logits)
62+
recall_micro(y_true, logits)
63+
recall_macro(y_true, logits)
64+
65+
recall_micro_score = recall_micro.__returnmetric__()
66+
recall_macro_score = recall_macro.__returnmetric__()
6467

6568
assert isinstance(recall_micro_score, torch.Tensor), "Expected a tensor output."
6669
assert isinstance(recall_macro_score, torch.Tensor), "Expected a tensor output."

0 commit comments

Comments
 (0)