Skip to content

Commit

Permalink
r.learn.ml: fix deprecated joblib import (#324)
Browse files Browse the repository at this point in the history
Fixes `DeprecationWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+.`

Ref:
scikit-optimize/scikit-optimize#776
  • Loading branch information
neteler committed Oct 29, 2020
1 parent 0e61c94 commit e02cc27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grass7/raster/r.learn.ml/r.learn.ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def load_training_data(file):


def save_model(estimator, X, y, sample_coords, groups, filename):
from sklearn.externals import joblib
import joblib
joblib.dump((estimator, X, y, sample_coords, group_id), filename)


Expand Down

0 comments on commit e02cc27

Please sign in to comment.