Skip to content

Commit d326c91

Browse files
use absolute tolerance as another criterion (#2255) (#2258)
1 parent 08d41b2 commit d326c91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onedal/linear_model/tests/test_incremental_linear_regression.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def test_full_results(queue, num_blocks, dtype):
9292
tol = 5e-3 if model.coef_.dtype == np.float32 else 1e-5
9393
else:
9494
tol = 3e-3 if model.coef_.dtype == np.float32 else 1e-5
95-
assert_allclose(coef, model.coef_.T, rtol=tol)
95+
atol = 1e-4 if model.coef_.dtype == np.float32 else 1e-6
96+
assert_allclose(coef, model.coef_.T, rtol=tol, atol=atol)
9697

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

0 commit comments

Comments
 (0)