-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
TST adapt tol for ridge tests to pass on all random seeds #23017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TST adapt tol for ridge tests to pass on all random seeds #23017
Conversation
@jeremiedbb Is there a way to run CI with |
Nope. I'm currently working on it :) |
@@ -1663,7 +1663,7 @@ def test_ridge_fit_intercept_sparse(solver, with_sample_weight, global_random_se | |||
sparse_ridge.fit(sp.csr_matrix(X), y, sample_weight=sample_weight) | |||
|
|||
assert_allclose(dense_ridge.intercept_, sparse_ridge.intercept_) | |||
assert_allclose(dense_ridge.coef_, sparse_ridge.coef_) | |||
assert_allclose(dense_ridge.coef_, sparse_ridge.coef_, rtol=5e-7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change required for test_ridge_fit_intercept_sparse
to locally pass for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, to pass for all random seeds.
In |
test_ridge_regression_unpenalized_vstacked_X test_ridge_fit_intercept_sparse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well. Maybe we could merge both this and #23152 to make the tests even more robust to small platform-specifc variations while not making the test too trivial either.
test_ridge_regression_vstacked_X test_ridge_fit_intercept_sparse
Let's merge both |
Reference Issues/PRs
Fixed #23014.
What does this implement/fix? Explain your changes.
Adapts tolerances to let ridge tests pass on all random seeds
Any other comments?
On my machine, the following passes: