Skip to content

Commit

Permalink
Minor (slightly increase test tolerances)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Tatzel committed Jun 14, 2024
1 parent d4e8185 commit 32e399c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_cg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 32e399c

Please sign in to comment.