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
467 stars 51 forks source link

Can't install on Kaggle's Python 3.7 #185

Closed kylegilde closed 3 years ago

kylegilde commented 3 years ago

I can't seem to install the package in a Kaggle Notebook.

pip3 install tune-sklearn ray[tune]

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f43a9427290>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tune-sklearn/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f43a9554f90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tune-sklearn/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f43a9554cd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tune-sklearn/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f43a9554b50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tune-sklearn/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f43a9554ad0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tune-sklearn/
ERROR: Could not find a version that satisfies the requirement tune-sklearn (from versions: none)
ERROR: No matching distribution found for tune-sklearn

import sys
print(sys.version)

3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) 
[GCC 7.3.0]
Yard1 commented 3 years ago

I may be misremembering but don't you need to explicitly turn on web support on Kaggle?

kylegilde commented 3 years ago

Ok, turning on the Internet in Settings does appear to allow me to install the package.

However, now I'm getting this import error when I try to import any part of the package.

Any suggestions? Thanks


from tune_sklearn import TuneGridSearchCV
# import tune_sklearn as ts

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-11-c70cb68ac57f> in <module>
----> 1 from tune_sklearn import TuneGridSearchCV

/opt/conda/lib/python3.7/site-packages/tune_sklearn/__init__.py in <module>
----> 1 from tune_sklearn.tune_gridsearch import TuneGridSearchCV
      2 from tune_sklearn.tune_search import TuneSearchCV
      3 from tune_sklearn._version import __version__
      4 
      5 __all__ = ["TuneGridSearchCV", "TuneSearchCV", "__version__"]

/opt/conda/lib/python3.7/site-packages/tune_sklearn/tune_gridsearch.py in <module>
      5 import os
      6 
----> 7 from ray.tune.stopper import CombinedStopper
      8 from sklearn.base import clone
      9 from sklearn.model_selection import ParameterGrid

ImportError: cannot import name 'CombinedStopper' from 'ray.tune.stopper' (/opt/conda/lib/python3.7/site-packages/ray/tune/stopper.py)
kylegilde commented 3 years ago

Let's close this and start a new issue.