fix(ci): pin scikit-learn<1.9 to restore G13.1 notebook gate#115
Merged
Conversation
scikit-learn 1.9.0 changed HistGradientBoostingClassifier defaults in a way that improves the flat GBM more than the engineered one in NB02 (02_relational_feature_engineering.ipynb), causing the headline GBM(eng)−GBM(flat) AUC lift to go from +0.0110 to -0.0253 and breaking the `assert observed["headline_lift_auc"] > 0.0` guard. Observed (sklearn 1.9.0, seed 42, intermediate bundle): gbm_flat_auc: 0.6339 (target 0.6023, |diff| 0.0316 > tol 0.0200) headline_lift_auc: -0.0253 (target 0.0110, |diff| 0.0363 > tol 0.0150) Pin `scikit-learn>=1.3,<1.9` in [dev], [scripts], and [notebooks] extras to restore CI while the root cause is investigated. Tracking issue: #114. The pin should be removed once NB02 targets are recalibrated or the engineered features are revised to provide positive lift on sklearn 1.9. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
pr-agent-context report: No unresolved review comments, failing checks, or actionable patch coverage gaps were found on PR #115 in repository https://github.com/leadforge-dev/leadforge. Treat this PR as all clear unless new signals appear.Run metadata: |
There was a problem hiding this comment.
Pull request overview
Pins scikit-learn to <1.9 in the relevant optional dependency extras to restore the Execute release notebooks (G13.1) CI gate that began failing after scikit-learn 1.9.0 changed HistGradientBoostingClassifier defaults, causing deterministic notebook-metric drift.
Changes:
- Pin
scikit-learn>=1.3,<1.9in[project.optional-dependencies].dev. - Keep the same pin in the
[scripts]and[notebooks]extras (explicitly noted as kept in sync). - Add in-file context and a link to issue #114 documenting the temporary nature of the pin.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Restores the failing
Execute release notebooks (G13.1)CI gate by pinningscikit-learn<1.9in all three relevant extras ([dev],[scripts],[notebooks]). The gate has been failing on every PR since sklearn 1.9.0shipped, because the uncapped
>=1.3was resolving to 1.9.0 in CI.Root cause
scikit-learn 1.9.0changedHistGradientBoostingClassifierdefaults in away that improves the flat GBM model substantially while the
engineered-feature GBM does not keep pace. In notebook 02
(
02_relational_feature_engineering.ipynb) this causes the headlineGBM(eng)−GBM(flat) lift to go non-positive, triggering:
Note:
random_state=SEEDis already set in the notebook's GBM constructor —the change is deterministic per version, not randomness.
Fix
Pin
scikit-learn>=1.3,<1.9inpyproject.toml(dev + scripts + notebooksextras). All three kept in sync with the same upper bound.
This is a hold, not a resolution
Tracking issue #114 documents the root cause and the steps to remove the
pin:
NB02_TARGETSis appropriate, or whether the relational engineered features need updating to
restore positive lift on 1.9.
Testing
pinned local version).
release bundles on disk). Confident the pin restores it because the failure
is deterministically tied to the 1.9.0 version observed in CI logs.
🤖 Generated with Claude Code