Skip to content

FIX seed in test_ridge_sample_weight_consistency [all random seeds] #26589

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

Conversation

ogrisel
Copy link
Member

@ogrisel ogrisel commented Jun 15, 2023

Fix a random failure in test_ridge_sample_weight_consistency while ensuring that the saga solver is not too seed sensitive.

The failure was first observed in the unrelated #26464.

Note that the data used in this test still uses a fixed 42 seed. I tried to change it to global_random_seed but that would make the test fail for other (deterministic) solvers such as lbfgs for some seed values so I decided to keep this PR focused on seeding SAG and SAGA.

@ogrisel
Copy link
Member Author

ogrisel commented Jun 15, 2023

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not so nice that this is necessary, but it seems to work at the moment.

Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
@lorentzenchr lorentzenchr changed the title Fix seed in test_ridge_sample_weight_consistency [all random seeds] FIX seed in test_ridge_sample_weight_consistency [all random seeds] Jun 16, 2023
@lorentzenchr lorentzenchr merged commit c0d4f75 into scikit-learn:main Jun 16, 2023
@ogrisel ogrisel deleted the fix-seed-test_ridge_sample_weight_consistency branch June 21, 2023 22:33
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants