hyperopt / hyperopt-sklearn

Hyper-parameter optimization for sklearn
hyperopt.github.io/hyperopt-sklearn
Other
1.57k stars 270 forks source link

FutureWarning: The parameter 'presort' is deprecated and has no effect. #160

Open wilions opened 3 years ago

wilions commented 3 years ago

hi, I'm running a hyper-parameter optimization using hyperopt-sklearn on some scientific data on Colab. i've seen the following errors.

code are as follows

estim = HyperoptEstimator(regressor=any_regressor('rgr'), preprocessing=any_preprocessing('pre'), algo=tpe.suggest, max_evals=100, trial_timeout=100)

estim.fit(X_train, y_train) print(estim.score(X_test, y_test)) print(estim.best_model())

errors are

[01:56:24] WARNING: /workspace/src/objective/regression_obj.cu:152: reg:linear is now deprecated in favor of reg:squarederror.

0%| | 0/1 [00:00<?, ?it/s, best loss: ?]/usr/local/lib/python3.6/dist-packages/sklearn/ensemble/_gb.py:1342: FutureWarning: The parameter 'presort' is deprecated and has no effect. It will be removed in v0.24. You can suppress this warning by not passing any value to the 'presort' parameter. We also recommend using HistGradientBoosting models instead. FutureWarning)

linminhtoo commented 3 years ago

Yes, presort has been deprecated since v0.22 of sklearn. I just made a pull request to fix this.