Skip to content

TST Remove call to np.random.randint in test_missing_values_is_resilient - #33518

Merged
lesteve merged 4 commits into
scikit-learn:mainfrom
cakedev0:fix/flaky_test_forests_nan
Mar 11, 2026
Merged

lesteve merged 4 commits into
scikit-learn:mainfrom
cakedev0:fix/flaky_test_forests_nan

Conversation

@cakedev0

@cakedev0 cakedev0 commented Mar 11, 2026 •

Copy link
Copy Markdown
Member

Reference Issues/PRs

Fixes #33510

What does this implement/fix? Explain your changes.

Remove the call to np.random.randint and go back to using a fixed seed.

AI usage: No

@cakedev0
cakedev0 marked this pull request as ready for review March 11, 2026 12:59
@lesteve lesteve changed the title FIX: Remove call to np.random.randint in test_missing_values_is_resilient TST Remove call to np.random.randint in test_missing_values_is_resilient Mar 11, 2026

@lesteve lesteve left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@lesteve

lesteve commented Mar 11, 2026 •

Copy link
Copy Markdown
Member

I think it's good enough to do this for now to avoid random breakages in main and PRs. If you think this is worth looking at the variability and/or use global_random_seed, this can always be done in a further PR.

I enabled auto-merge.

@lesteve
lesteve enabled auto-merge (squash) March 11, 2026 13:13
@lesteve
lesteve merged commit 08f9b20 into scikit-learn:main Mar 11, 2026
30 checks passed
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.

CI Non-deterministic failure for sklearn/ensemble/tests/test_forest.py::test_missing_values_is_resilient on some CI builds

2 participants