fix: resolve test-suite warnings#1018
Merged
Merged
Conversation
Clean up the warnings emitted while running the test suite, without changing any behavior. Fixed at the source: - Augur logistic regression no longer passes the `penalty` argument that scikit-learn 1.8 deprecated; the L1/L2 mix is now expressed via `l1_ratio` (l2 -> 0.0, identical coefficients to the old default) and the unregularized case via `C=np.inf`, with `saga` for the L1 paths. - The statsmodels DGE test sets the negative-binomial `alpha=1.0` explicitly (the previous implicit default), removing the dispersion warning raised at collection time. - The perturbation-space test wraps the intentional `ensure_consistency=False` calls in `pytest.warns`, asserting the expected UserWarning instead of letting it leak into the summary. Filtered as unavoidable third-party noise (consistent with the existing filterwarnings entries): - pydeseq2 dispersion-trend / residual-degrees-of-freedom warnings on the small synthetic data used by the Milo and compare_groups tests. - jaxopt maintenance notice, joblib loky worker notice, and the formulaic DataMismatchWarning from no-intercept contrast handling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Points the tutorials submodule at scverse/pertpy-tutorials#65, which speeds up the miloDE section of the Milo notebook to run in well under 15 minutes (it had regressed to ~90 minutes). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
scverse/pertpy-tutorials#65 is merged; point the submodule at the squashed commit on tutorials main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1018 +/- ##
==========================================
- Coverage 77.81% 77.80% -0.01%
==========================================
Files 50 50
Lines 6580 6584 +4
==========================================
+ Hits 5120 5123 +3
- Misses 1460 1461 +1
🚀 New features to boost your workflow:
|
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.
Summary
Cleans up the warnings emitted while running the test suite. Running
pytestonmainproduced 329 warnings; with this change the runnable subset produces 0. No library behavior changes.Fixed at the source
penaltyargument that scikit-learn 1.8 deprecated (FutureWarning, removal in 1.10). The L1/L2 mix is now expressed withl1_ratioand the unregularized case withC:l2→l1_ratio=0.0(verified to produce identical coefficients to the old default, defaultlbfgssolver, works across the supported sklearn range)l1→l1_ratio=1.0,elasticnet→l1_ratio=0.5(both with thesagasolver)none/None→C=np.infalpha=1.0explicitly — the previous implicit default — removing theValueWarningraised when the parametrization is collected.ensure_consistency=Falseadd/subtractcalls inpytest.warns(UserWarning, ...), which both silences the leaked warning and asserts the warning is actually raised.Filtered as unavoidable third-party noise
Added to the existing
filterwarningslist inpyproject.toml(same pattern already used for ~15 other dependency warnings):compare_groupstests use (this was ~310 of the 329 warnings).DataMismatchWarningfrom no-intercept contrast handling in the DGE base tests.Notes
penaltydeprecation was fixed in code rather than filtered, since it originates from pertpy's own call.🤖 Generated with Claude Code