Closed abheesht17 closed 3 years ago
Consider this piece of code:
from ray.tune.sklearn import TuneSearchCV from sklearn.linear_model import SGDClassifier from sklearn import datasets from sklearn.model_selection import train_test_split import numpy as np digits = datasets.load_digits() x = digits.data y = digits.target x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=.2) clf = SGDClassifier() parameter_grid = {"alpha": (1e-4, 1), "epsilon": (0.01, 0.1)} tune_search = TuneSearchCV( clf, parameter_grid, search_optimization="bayesian", n_trials=3, early_stopping=True, max_iters=10, ) tune_search.fit(x_train, y_train) print(tune_search.best_params_)
This has been obtained from the docs. I am running the code on Colab. I have reproduced the error on the following link: https://colab.research.google.com/drive/1z2vpBE7HTS6Iq2G_h9MQWIL_Aw8pKzaT?usp=sharing
This just requires a better error message on our side. Please run pip install tune_sklearn.
pip install tune_sklearn
Thank you for the swift reply! It works now.
What is the problem?
Consider this piece of code:
This has been obtained from the docs. I am running the code on Colab. I have reproduced the error on the following link: https://colab.research.google.com/drive/1z2vpBE7HTS6Iq2G_h9MQWIL_Aw8pKzaT?usp=sharing