Skip to content

chore(deps): bump scikit-learn to 1.9 and surface version skew - #119

Merged
jsugg merged 1 commit into
mainfrom
chore/scikit-learn-1.9
Nov 10, 2026
Merged

jsugg merged 1 commit into
mainfrom
chore/scikit-learn-1.9

Conversation

@jsugg

@jsugg jsugg commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrades scikit-learn to >=1.9.0,<1.10.0 (locks 1.9.1, released 2026-09-10; adds narwhals 2.28.0). Supersedes #76. Approved by the owner on condition that the owner's Intel macOS machine keeps working unchanged.

Changes

  1. Dependency: pyproject.toml spec plus uv.lock.
  2. Quality-gate fallback visibility (ser/_internal/runtime/profile_quality_gate.py): when grouped CV is infeasible, a WARNING now logs the requested n_splits, distinct speakers, samples, holdout size and folds=1 before the existing single grouped holdout. Fallback semantics and the reported fold_strategy are unchanged.
  3. Artifact metadata: new artifacts record sklearn_version at save time (optional field, validated; older artifacts without it still load).
  4. Loader (ser/_internal/models/artifact_loading.py): the blanket filterwarnings("ignore") around pickle.load (generic noise suppression since a 2024 housekeeping commit; no test relied on it) is replaced by recording warnings. InconsistentVersionWarning is logged once per artifact and version pair at WARNING, naming the estimators and giving re-train or re-save guidance. Other unpickling warnings stay contained.
  5. CHANGELOG: notes that the 1.8 StratifiedGroupKFold(shuffle=True) fix shifts grouped-CV metrics once.

No quality-gate baselines are stored in the repo; gate thresholds are relative medium-versus-fast deltas, so nothing needed re-baselining.

Owner-machine compatibility (Intel i9, macOS 15.7, Python 3.12.8, numpy 1.26.4, torch 2.2.2)

Run with this branch's environment (scikit-learn 1.9.1) against a byte-identical copy of the owner's model:

  • predict_proba on 2000 fixed inputs versus the 1.7.2 reference: max abs difference 0.0, argmax agreement 1.0.
  • ser --file sample.wav --profile fast output is byte-identical to the 1.7.2 run. The new loader WARNING appears exactly once, and no raw InconsistentVersionWarning leaks.

Validation

Local gates: make lock-check fmt lint type prepush-check type-completeness ci-contracts test-cov (1273 passed, 80.00%). New tests cover a real version-skewed pickle (warning logged once), quiet loads for matching versions and unrelated warnings, sklearn_version stamping and validation, and the fallback WARNING. Lanes dispatched on this branch: results are posted below.

Requires scikit-learn >=1.9.0,<1.10.0 (locks 1.9.1; adds narwhals).

- Quality gate logs a WARNING with requested folds, speaker and sample
  counts when grouped CV falls back to a single grouped holdout. The
  fallback and the reported fold_strategy are unchanged.
- Artifact metadata records the scikit-learn version at save time.
- The pickle loader no longer drops InconsistentVersionWarning
  silently: it logs one WARNING per artifact with re-train or re-save
  guidance. Other unpickling warnings stay suppressed, as before.
- CHANGELOG notes the one-time CV metric shift from the 1.8
  StratifiedGroupKFold shuffle fix.
@jsugg

jsugg commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Lane results on this branch:

@jsugg
jsugg merged commit 60a9688 into main Nov 10, 2026
18 checks passed
@jsugg
jsugg deleted the chore/scikit-learn-1.9 branch November 10, 2026 06:45
jsugg added a commit that referenced this pull request Nov 10, 2026
chore(deps): bump scikit-learn to 1.9 and surface version skew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant