From 90cb75acfd56f6acf1ba7f992119377d3e454b8d Mon Sep 17 00:00:00 2001 From: Simon Alibert Date: Thu, 2 May 2024 15:47:28 +0200 Subject: [PATCH] atol=1e-7 --- tests/test_policies.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_policies.py b/tests/test_policies.py index e25f3f9f..15e582da 100644 --- a/tests/test_policies.py +++ b/tests/test_policies.py @@ -255,10 +255,10 @@ def test_backward_compatibility(env_name, policy_name, extra_overrides): output_dict, grad_stats, param_stats, actions = get_policy_stats(env_name, policy_name, extra_overrides) for key in saved_output_dict: - assert torch.isclose(output_dict[key], saved_output_dict[key], rtol=0.5, atol=1e-6).all() + assert torch.isclose(output_dict[key], saved_output_dict[key], rtol=0.5, atol=1e-7).all() for key in saved_grad_stats: - assert torch.isclose(grad_stats[key], saved_grad_stats[key], rtol=0.5, atol=1e-6).all() + assert torch.isclose(grad_stats[key], saved_grad_stats[key], rtol=0.5, atol=1e-7).all() for key in saved_param_stats: - assert torch.isclose(param_stats[key], saved_param_stats[key], rtol=0.5, atol=1e-6).all() + assert torch.isclose(param_stats[key], saved_param_stats[key], rtol=0.5, atol=1e-7).all() for key in saved_actions: - assert torch.isclose(actions[key], saved_actions[key], rtol=0.5, atol=1e-6).all() + assert torch.isclose(actions[key], saved_actions[key], rtol=0.5, atol=1e-7).all()