Skip to content

TST/CI fix all global_random_see in test_spectral_biclustering - #35063

Merged
ogrisel merged 4 commits into
scikit-learn:mainfrom
lorentzenchr:test_spectral_biclustering
Oct 13, 2026
Merged

ogrisel merged 4 commits into
scikit-learn:mainfrom
lorentzenchr:test_spectral_biclustering

Conversation

@lorentzenchr

Copy link
Copy Markdown
Member

Reference Issues/PRs

Found in #34961 (comment).

What does this implement/fix? Explain your changes.

SKLEARN_TESTS_GLOBAL_RANDOM_SEED="all" pytest -x sklearn/cluster/tests/test_bicluster.py::test_spectral_biclustering failed with random seed 97.
The fix was setting n_init from 3 to 5

This PR also modernizes the test by using @pytest.mark.parametrize.

AI usage disclosure

None

Any other comments?

@cakedev0 cakedev0 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.

LGTM, some nits

Comment thread sklearn/cluster/tests/test_bicluster.py Resolved
Comment thread sklearn/cluster/tests/test_bicluster.py Resolved
Comment thread sklearn/cluster/tests/test_bicluster.py Resolved

@cakedev0 cakedev0 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.

LGTM

@lorentzenchr lorentzenchr added the Waiting for Second Reviewer First reviewer is done, need a second one! label Oct 12, 2026

@OmarManzoor OmarManzoor left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR @lorentzenchr

Can you please add a commit with [all random seeds] for this particular test?

@StefanieSenger StefanieSenger 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.

This looks alright. The CI failures are unrelated. We cannot merge despite, but if you push a usual empty commit without the [all random seeds] flag, we can merge afterwards.

@ogrisel
ogrisel enabled auto-merge (squash) October 13, 2026 09:32
@ogrisel
ogrisel merged commit d1278c2 into scikit-learn:main Oct 13, 2026
35 checks passed
@lorentzenchr
lorentzenchr deleted the test_spectral_biclustering branch October 13, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build / CI module:cluster No Changelog Needed Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants