Skip to content

Commit

Permalink
Update tests/ignite/contrib/metrics/test_roc_curve.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Jul 7, 2023
1 parent 27d64fd commit e0ab81b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/ignite/contrib/metrics/test_roc_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ def update_fn(engine, batch):
roc_curve_metric.attach(engine, "roc_curve")

data = list(range(size // batch_size))
fpr, tpr, thresholds = engine.run(data, max_epochs=1).metrics["roc_curve"]
fpr, tpr, thresholds = engine.run(data, max_epochs=1).metrics["roc_curve"]

assert np.array_equal(fpr, sk_fpr)
assert np.array_equal(tpr, sk_tpr)
Expand Down Expand Up @@ -162,11 +160,6 @@ def update(engine, i):

fpr, tpr, thresholds = engine.state.metrics["roc_curve"]

assert isinstance(fpr, torch.Tensor) and fpr.device == device
assert isinstance(tpr, torch.Tensor) and tpr.device == device
assert isinstance(thresholds, torch.Tensor) and thresholds.device == device
fpr, tpr, thresholds = engine.state.metrics["roc_curve"]

assert isinstance(fpr, torch.Tensor) and fpr.device == device
assert isinstance(tpr, torch.Tensor) and tpr.device == device
assert isinstance(thresholds, torch.Tensor) and thresholds.device == device
Expand Down

0 comments on commit e0ab81b

Please sign in to comment.