Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SkafteNicki committed Apr 20, 2021
1 parent 9ba02e7 commit bb78a9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/bases/test_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from tests.helpers import seed_all
from tests.helpers.testers import DummyListMetric, DummyMetric, DummyMetricSum
from torchmetrics.utilities.imports import _LIGHTNING_GREATER_THAN_1_3, _TORCH_LOWER_1_6
from torchmetrics.utilities.imports import _LIGHTNING_AVAILABLE, _LIGHTNING_GREATER_EQUAL_1_3, _TORCH_LOWER_1_6

seed_all(42)

Expand Down Expand Up @@ -101,7 +101,7 @@ def test_reset_compute():
a.update(tensor(5))
assert a.compute() == 5
a.reset()
if _LIGHTNING_GREATER_THAN_1_3:
if not _LIGHTNING_AVAILABLE or _LIGHTNING_GREATER_EQUAL_1_3:
assert a.compute() == 0
else:
assert a.compute() == 5
Expand Down

0 comments on commit bb78a9d

Please sign in to comment.