microsoft / hummingbird

Hummingbird compiles trained ML models into tensor computation for faster inference.
MIT License
3.32k stars 274 forks source link

SKL 1.4 release breaks build #755

Closed ksaur closed 5 months ago

ksaur commented 5 months ago

Scikit-learn 1.4.0 was released today.

We have the following errors (ci run):

 =========================== short test summary info ============================
FAILED tests/test_sklearn_bagging.py::TestSklearnBagging::test_bagging_linear_regression - TypeError: BaggingRegressor.__init__() got an unexpected keyword argument 'base_estimator'
FAILED tests/test_sklearn_bagging.py::TestSklearnBagging::test_bagging_linear_svr - TypeError: BaggingRegressor.__init__() got an unexpected keyword argument 'base_estimator'
FAILED tests/test_sklearn_bagging.py::TestSklearnBagging::test_bagging_linear_svr_1 - TypeError: BaggingRegressor.__init__() got an unexpected keyword argument 'base_estimator'
FAILED tests/test_sklearn_bagging.py::TestSklearnBagging::test_bagging_logistic_regression - TypeError: BaggingClassifier.__init__() got an unexpected keyword argument 'base_estimator'
FAILED tests/test_sklearn_bagging.py::TestSklearnBagging::test_bagging_svc - TypeError: BaggingClassifier.__init__() got an unexpected keyword argument 'base_estimator'
FAILED tests/test_sklearn_bagging.py::TestSklearnBagging::test_bagging_svc_1 - TypeError: BaggingClassifier.__init__() got an unexpected keyword argument 'base_estimator'
===== 6 failed, 359 passed, 275 skipped, 69 warnings in 125.83s (0:02:05) =================
ksaur commented 5 months ago

See https://github.com/scikit-learn/scikit-learn/pull/27826

ksaur commented 5 months ago

And also failures in: tests\test_extra_conf.py ........FF.Fs............ssssssssssss

>           raise MissingConverter("Unable to find converter for model type {}.".format(model_type))
E           hummingbird.ml.exceptions.MissingConverter: Unable to find converter for model type <class 'sklearn.preprocessing._function_transformer.FunctionTransformer'>.

See https://github.com/scikit-learn/scikit-learn/pull/27204/

and

tests\test_sklearn_pipeline.py ....F.FFFFFFF.FF.......

>       categorical_transformer = Pipeline(steps=[("onehot", OneHotEncoder(sparse=True, handle_unknown="ignore"))])
E       TypeError: OneHotEncoder.__init__() got an unexpected keyword argument 'sparse'

See https://github.com/scikit-learn/scikit-learn/pull/27861

ksaur commented 5 months ago

TODO: will need a new parser for FunctionTransformer but hopefully we can reuse the columntransfer logic as much as possible.