Skip to content

Commit

Permalink
adjust precision of comparison in test
Browse files Browse the repository at this point in the history
this test fails intermittently. the main difference between this branch and master is the a chance
difference in the order the tests are run which reliably triggers the failure.
  • Loading branch information
leej3 committed Mar 27, 2024
1 parent 7210b16 commit 79ef36f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ignite/metrics/regression/test_mean_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _test(metric_device):
np_len = len(np_y_pred)
np_ans = np_sum / np_len

assert m.compute() == pytest.approx(np_ans)
assert m.compute() == pytest.approx(np_ans, rel=1e-5)

for i in range(3):
torch.manual_seed(10 + rank + i)
Expand Down

0 comments on commit 79ef36f

Please sign in to comment.