Skip to content

Commit

Permalink
Lower atol threshold for DT's save_policy test
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed May 5, 2024
1 parent 8f08fb3 commit b734d4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/algos/transformer/algo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def save_policy_tester(
if algo.get_action_type() == ActionSpace.DISCRETE:
assert action == algo.predict(inpt).argmax()
else:
assert np.allclose(action, algo.predict(inpt), atol=1e-4)
assert np.allclose(action, algo.predict(inpt), atol=1e-3)

# check save_policy as ONNX
algo.save_policy(os.path.join("test_data", "model.onnx"))
Expand All @@ -319,4 +319,4 @@ def save_policy_tester(
if algo.get_action_type() == ActionSpace.DISCRETE:
assert action == algo.predict(inpt).argmax()
else:
assert np.allclose(action, algo.predict(inpt), atol=1e-4)
assert np.allclose(action, algo.predict(inpt), atol=1e-3)

0 comments on commit b734d4e

Please sign in to comment.