From 32e399cfba92c301043b2bd6e19ec4483eb301b6 Mon Sep 17 00:00:00 2001 From: Lukas Tatzel Date: Fri, 14 Jun 2024 11:45:41 +0200 Subject: [PATCH] Minor (slightly increase test tolerances) --- tests/test_cg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cg.py b/tests/test_cg.py index 392cdbe..6ce8ee5 100644 --- a/tests/test_cg.py +++ b/tests/test_cg.py @@ -28,7 +28,7 @@ # The "incrementally" computed residual in cg might differ slightly from # `A @ x_cg - b`. -EPS = 5e-7 +EPS = 5e-6 @pytest.mark.parametrize("seed", SEEDS, ids=SEEDS_IDS) @@ -153,7 +153,7 @@ def quadratic(x): m_vals = torch.Tensor(m_iters) error_msg = "Discrepancy between quadratic and `m_iters`" - assert torch.allclose(quadratic_vals, m_vals), error_msg + assert torch.allclose(quadratic_vals, m_vals, atol=1e-7), error_msg @pytest.mark.parametrize("seed", SEEDS, ids=SEEDS_IDS)