Repository navigation
Conversation
The flake was kBET, which moved between 0.941667 and 0.991667 while every other score, and the auto and arpack PCA baselines (subspace angle under 1e-5), agreed. kBET never sees the baseline: scib diffuses each label's graph through scipy's eigsh with an unseeded random start vector, and on some CI runners about one start in twenty lands on the other kBET value. The test now gives eigsh a fixed start vector, so it checks the solver and nothing else.
timtreis
force-pushed
the
fix/flaky-solver-test
branch
from
November 15, 2026 00:48
df898bf to
0bc66c3
Compare
timtreis
marked this pull request as ready for review
November 15, 2026 00:48
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #337 +/- ##
=======================================
Coverage 79.60% 79.60%
=======================================
Files 97 97
Lines 12354 12354
=======================================
Hits 9835 9835
Misses 2519 2519 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_evaluate_integration_baseline_solver_auto_matches_arpackflaked because of kBET, not the PCA solver. scib'skbet_per_labelcallsscipy.sparse.linalg.eigshwith an unseeded random start vector. On some runners, 3 of 60 unseeded calls on the same kNN graph gave 0.991667 where the rest gave 0.941667. Start-vector seeds 4, 11 and 19 always give 0.991667.The test now patches
eigshwith a fixedv0, so both runs use the same start vector. The tolerance stays at 1e-4. The two solvers' baselines agree to a subspace angle below 1e-5.Verified on CI with a temporary diagnostic, since removed: on all three hatch envs, a fixed start vector gave the same kBET in 60 of 60 calls, and the patched test failed 0 of 8 times.
tests/test_metrics.py, ruff, ruff format and mypy pass locally.