Skip to content

Commit

Permalink
use absolute tolerance as another criterion (#2255) (#2258)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes-intel authored Jan 15, 2025
1 parent 08d41b2 commit d326c91
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def test_full_results(queue, num_blocks, dtype):
tol = 5e-3 if model.coef_.dtype == np.float32 else 1e-5
else:
tol = 3e-3 if model.coef_.dtype == np.float32 else 1e-5
assert_allclose(coef, model.coef_.T, rtol=tol)
atol = 1e-4 if model.coef_.dtype == np.float32 else 1e-6
assert_allclose(coef, model.coef_.T, rtol=tol, atol=atol)

tol = 3e-3 if model.intercept_.dtype == np.float32 else 1e-5
assert_allclose(intercept, model.intercept_, rtol=tol)
Expand Down

0 comments on commit d326c91

Please sign in to comment.