Skip to content

Commit

Permalink
Relax metric optimization test results even more
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kümmerer <[email protected]>
  • Loading branch information
matthias-k committed Jun 25, 2024
1 parent c902f4e commit af8829c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_metric_optimization_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def test_maximize_expected_sim_decay_1overk():
)

print(score)
np.testing.assert_allclose(score, -0.8204902112483976, rtol=2e-4) # need bigger tolerance to handle differences between CPU and GPU and also between different test environments.
# We need a quite big tolerance in this test. Apparently there are
# substantial differences between different systems, I'm not sure why.
np.testing.assert_allclose(score, -0.8204902112483976, rtol=5e-4)


def test_maximize_expected_sim_decay_on_plateau():
Expand All @@ -41,4 +43,4 @@ def test_maximize_expected_sim_decay_on_plateau():
)

print(score)
np.testing.assert_allclose(score, -0.8205618500709532, rtol=2e-4) # need bigger tolerance to handle differences between CPU and GPU
np.testing.assert_allclose(score, -0.8205618500709532, rtol=5e-4) # need bigger tolerance to handle differences between CPU and GPU

0 comments on commit af8829c

Please sign in to comment.