ray-project / tune-sklearn

A drop-in replacement for Scikit-Learn’s GridSearchCV / RandomizedSearchCV -- but with cutting edge hyperparameter tuning techniques.
https://docs.ray.io/en/master/tune/api_docs/sklearn.html
Apache License 2.0
465 stars 52 forks source link

Import `mlflow` integration from new `air.integrations` module #264

Closed justinvyu closed 1 year ago

justinvyu commented 1 year ago

Ray has some unit-tests depending on this package. The ray.tune.integration package is getting hard-deprecated in Ray 2.6, so this needs package needs to import from the new location at ray.air.integrations to unblock that.

In particular, it's this user guide doctest that would fail: https://docs.ray.io/en/latest/tune/examples/tune-sklearn.html

Yard1 commented 1 year ago

Actually, can we have a try...except import here? @justinvyu

justinvyu commented 1 year ago

I think the MLFlowLoggerCallback already try catches if mlflow is not installed.

matthewdeng commented 1 year ago

@Yard1 by try/except do you mean something like:

try import from air --> except import from tune

justinvyu commented 1 year ago

No need to try catch since tune_sklearn depends on ray>=2.0, and the module was already moved to air.integrations at 2.0. Relaunching the CI, then we can merge after it passes.

justinvyu commented 1 year ago

CI for latest Ray release is failing due to a fix that did not make the branch cut but will be fixed on 2.6.

CI for master is failing due to a similar issue as this flaky example on ray: https://github.com/ray-project/ray/issues/35428

justinvyu commented 1 year ago

Passing with master wheel here: https://github.com/ray-project/tune-sklearn/actions/runs/5426940588/jobs/9869633497