Background
sklearn 1.0+ ships HalvingGridSearchCV and HalvingRandomSearchCV (the "successive halving" hyperparameter search) under sklearn.model_selection. They're faster than GridSearchCV on large grids - relevant for serious users tuning n_components plus preprocessing options jointly across PLS / TPLS pipelines.
The sklearn Pipeline interop audit in #383 only exercised GridSearchCV. The halving searchers are slightly more demanding of custom estimators: they call partial_fit (when supported), introspect n_iter_, and dispatch on resource parameters in ways GridSearchCV doesn't. Custom estimators sometimes trip on the resource scheduling.
What to do
- Add tests:
HalvingGridSearchCV(Pipeline([MCUVScaler(), PLS()]), {"pls__n_components": [1,2,3,4,5]})
HalvingRandomSearchCV analogue.
- Both with
resource="n_samples" (the default) and a Pipeline-aware budget.
- Fix anything that surfaces. Most likely candidates: missing
partial_fit, missing tags, n_features_in_ validation paths.
Why this matters less than #383's core fixes
GridSearchCV works (verified in #383). Halving is an optimisation. The reason to do this issue is purely to know whether the more modern search APIs work, not because they're currently blocking anyone.
Related
Spun out from the sklearn interop audit attached to #383.
Background
sklearn 1.0+ ships
HalvingGridSearchCVandHalvingRandomSearchCV(the "successive halving" hyperparameter search) undersklearn.model_selection. They're faster thanGridSearchCVon large grids - relevant for serious users tuningn_componentsplus preprocessing options jointly across PLS / TPLS pipelines.The sklearn Pipeline interop audit in #383 only exercised
GridSearchCV. The halving searchers are slightly more demanding of custom estimators: they callpartial_fit(when supported), introspectn_iter_, and dispatch onresourceparameters in waysGridSearchCVdoesn't. Custom estimators sometimes trip on the resource scheduling.What to do
HalvingGridSearchCV(Pipeline([MCUVScaler(), PLS()]), {"pls__n_components": [1,2,3,4,5]})HalvingRandomSearchCVanalogue.resource="n_samples"(the default) and a Pipeline-aware budget.partial_fit, missing tags,n_features_in_validation paths.Why this matters less than #383's core fixes
GridSearchCVworks (verified in #383). Halving is an optimisation. The reason to do this issue is purely to know whether the more modern search APIs work, not because they're currently blocking anyone.Related
Spun out from the sklearn interop audit attached to #383.