GH-16779: update estimators to support sklearn 1.6+#16780
GH-16779: update estimators to support sklearn 1.6+#16780zazulam wants to merge 1 commit intoh2oai:masterfrom
Conversation
Signed-off-by: zazulam <m.zazula@gmail.com>
|
@maurever can we get more eyes on this? |
|
|
@valenad1 any chance this can get some reviews? |
|
@valenad1 this is a blocker for us would greatly appreciate the reviews thank you! |
|
Hi @zazulam. I'm sorry we haven't been able to respond as quickly as you need. We are an open-source project with currently limited capacity to address community issues. We have registered your suggestion, and it is on our backlog, but unfortunately, we can't promise a specific timeline for when it will be resolved. Thank you for understanding. |
|
@maurever I totally understand and appreciate all your of your team's efforts. Thank you for adding it to your backlog 🙏 |



Fixes #16779
Summary
h2o.sklearnwrappers need compatibility updates for newer scikit-learn APIs, especially around estimator type semantics and tags behavior in scikit-learn 1.6+. scikit-learn revamped estimator tags in 1.6.0 (December 2024) and introduced__sklearn_tags__as the preferred API (withTagsobjects). This affects third-party estimator wrappers and type-dispatch behavior (is_classifier,is_regressor, clone/check tooling).For generic H2O sklearn wrappers (e.g.
H2OGradientBoostingEstimator(estimator_type='classifier')), semantics can drift in sklearn integration paths (notably clone + tags/type checks) unless wrapper params and_estimator_typeare propagated consistently.Proposed / implemented fix
In
h2o-py/h2o/sklearn/wrapper.py:_estimator_typeprecedence in classifier/regressor checks.estimator_typeandinit_connection_argsin sklearn parameter flow (get_params/set_params) so clone semantics are preserved.__sklearn_tags__handling for newer sklearn tags API when available.In
h2o-py/tests/testdir_sklearn/pyunit_sklearn_api.py:Validation run
testdir_sklearn/pyunit_sklearn_api.py→ PASStestdir_sklearn/pyunit_sklearn_params.py→ PASSDependency notes