You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloudpickle.py, the imp module is deprecated in favor of importlib #12434
A deprecation warning is thrown when using sklearn. Recently cloudpickle was updated to do away with this warning, the sklearn version needs to be updated accordingly.
Steps/Code to Reproduce
I imagine this occurs anywhere cloudpickle is imported. I am getting it from: from sklearn.ensemble import RandomForestRegressor
and using said Regressor
Expected Results
No deprecation warning should be thrown
Actual Results
/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
changed the title [-]Cloudpickle.py, The imp module is deprecated in favor of importlib[/-][+]Cloudpickle.py, the imp module is deprecated in favor of importlib[/+]on Oct 22, 2018
I'm using latest release of NLTK and I get the same issue!
/usr/local/lib/python3.7/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Activity
[-]Cloudpickle.py, The imp module is deprecated in favor of importlib[/-][+]Cloudpickle.py, the imp module is deprecated in favor of importlib[/+]1riggs commentedon Oct 22, 2018
See joblib pull:
joblib/joblib#788
rth commentedon Oct 22, 2018
Thanks for the information! That's a limitation of vendoring code unfortunately.
We will sync with the latest joblib before releasing 0.20.1 which should fix it.
1riggs commentedon Oct 22, 2018
Sounds great! Just wanted to make sure the team was aware, looking forward to not seeing the warning. Thanks for the otherwise awesome tool.
qinhanmin2014 commentedon Oct 23, 2018
Duplicate of #12226, please see the discussions there.
loretoparisi commentedon Jul 3, 2019
I'm using latest release of NLTK and I get the same issue!
qinhanmin2014 commentedon Jul 5, 2019
@loretoparisi please update your scikit-learn and open another issue if the problem persists.