Repository navigation
Fixes from an independent review of 1.21.1. Normal rankings are unchanged; the fixes close silent-failure paths.
pip install -U featranker
Fixes
- Models can no longer corrupt each other. Every model fits and scores on read-only views of the shared arrays (array and
model_input="dataframe", SHAP evidence included). A model that writes to its input now fails alone instead of silently changing later models' scores. Some scikit-learn linear models (Ridge; LinearRegression on 1.9) copy the read-only input once while fitting: about +17% peak memory on 1e5 × 200, no runtime change. - Opaque transformers are unverified for shadows. A
FunctionTransformerwith a function, or a transformer scikit-learn does not define, anywhere in a model (later pipeline steps,GridSearchCV,BaggingRegressor,TransformedTargetRegressor's regressor) leaves that model out of the shadow evidence with ashadowsfailure. Target transformers are not affected. Rankings are unchanged. - Shadow rules without shadow evidence (
min_shadow_share,max_shadow_q,min_shadow_families) raise a clearValueErrorinstead ofKeyError. - Repeated
cvsplits raiseValueError. A repeated split added no data but shrank shadow q-values. max_shadow_qis experimental. Using it warns that shadow q-values are uncalibrated;shadow_testrecords"experimental": true.ablate()checks model parameters against the report (raises on a mismatch; warns when the report came from another scikit-learn version).- Strict JSON with NumPy integers:
random_state,shadow_seed,n_repeats,top_kand similar arguments are recorded as plain ints. - CLI checks the output path before ranking and reports write errors without a traceback.
- The calibration harness test is repaired and
benchmarks/tests run in CI.
Behaviour changes
cvwith identical splits now raises.- Pipelines with custom transformers no longer count toward shadow rules; with only such models, shadow rules raise.
shadow_seed,n_repeatsandtop_kaccept NumPy integers.