Skip to content

Commit

Permalink
Relax metric optimization test results 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 3a12cd1 commit c902f4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_metric_optimization_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_maximize_expected_sim_decay_1overk():
)

print(score)
np.testing.assert_allclose(score, -0.8204902112483976, rtol=1e-6) # need bigger tolerance to handle differences between CPU and GPU
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.


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

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

0 comments on commit c902f4e

Please sign in to comment.