Skip to content

Commit

Permalink
Increase atol in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Mar 3, 2024
1 parent 823174f commit 1733620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/algos/qlearning/algo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def save_policy_tester(
if deterministic_best_action:
action = action.detach().numpy()
observations = convert_to_numpy_recursively(torch_observations)
assert np.allclose(action, algo.predict(observations), atol=1e-6)
assert np.allclose(action, algo.predict(observations), atol=1e-5)

# check save_policy as ONNX
algo.save_policy(os.path.join("test_data", "model.onnx"))
Expand All @@ -384,4 +384,4 @@ def save_policy_tester(
# TODO: check probablistic policy
# https://github.com/pytorch/pytorch/pull/25753
if deterministic_best_action:
assert np.allclose(action, algo.predict(observations), atol=1e-6)
assert np.allclose(action, algo.predict(observations), atol=1e-5)

0 comments on commit 1733620

Please sign in to comment.