From 97ded04b07b263431aa17495d4a659df640e4129 Mon Sep 17 00:00:00 2001 From: Simon Alibert Date: Thu, 2 May 2024 15:55:05 +0200 Subject: [PATCH] Try atol=1e-8 --- 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 24125aba..c116845d 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.1, atol=1e-7).all() + assert torch.isclose(output_dict[key], saved_output_dict[key], rtol=0.1, atol=1e-8).all() for key in saved_grad_stats: - assert torch.isclose(grad_stats[key], saved_grad_stats[key], rtol=0.1, atol=1e-7).all() + assert torch.isclose(grad_stats[key], saved_grad_stats[key], rtol=0.1, atol=1e-8).all() for key in saved_param_stats: - assert torch.isclose(param_stats[key], saved_param_stats[key], rtol=0.1, atol=1e-7).all() + assert torch.isclose(param_stats[key], saved_param_stats[key], rtol=0.1, atol=1e-8).all() for key in saved_actions: - assert torch.isclose(actions[key], saved_actions[key], rtol=0.1, atol=1e-7).all() + assert torch.isclose(actions[key], saved_actions[key], rtol=0.1, atol=1e-8).all()