We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3d691c commit d2f935dCopy full SHA for d2f935d
tests/ignite/metrics/test_roc_auc.py
@@ -4,6 +4,7 @@
4
import pytest
5
import sklearn
6
import torch
7
+from sklearn.exceptions import UndefinedMetricWarning
8
from sklearn.metrics import roc_auc_score
9
10
import ignite.distributed as idist
@@ -112,7 +113,7 @@ def test_check_compute_fn():
112
113
em = ROC_AUC(check_compute_fn=True)
114
115
em.reset()
- with pytest.warns(EpochMetricWarning, match=r"Probably, there can be a problem with `compute_fn`"):
116
+ with pytest.warns((UndefinedMetricWarning, EpochMetricWarning), match=r"Only one class.+present in y_true"):
117
em.update(output)
118
119
em = ROC_AUC(check_compute_fn=False)
0 commit comments