Reputation: 53
I have already trained 85 models using ExtraTreeClassifiers and saved them (TO be honest, I cannot remember the python version or Sci-kit version or Anaconda version I was using while training the models). Due to some disk issues I had to replace hard disk and install OS(Windows10) again and installed Anaconda3 2020.07(Python 3.8.3 64 bit) now. But now when I try to use this models for prediction purpose I am getting the following warning:
quote C:\Users\DELL\anaconda3\lib\site-packages\sklearn\base.py:313: UserWarning: Trying to unpickle estimator ExtraTreesClassifier from version 0.22.2.post1 when using version 0.23. This might lead to breaking code or invalid results. Use at your own risk.
So I uninstalled sklearn version 0.23 and installed version 0.22.2. If I do this I get the following warning
quote C:\Users\DELL\anaconda3\lib\site-packages\sklearn\base.py:313: UserWarning: Trying to unpickle estimator ExtraTreesClassifier from version 0.22 post1 when using version 0.22.2. This might lead to breaking code or invalid results. Use at your own risk.
So I uninstalled sklearn version 0.22.2 and installed version 0.22. If I do this I get the following error:
quote ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\Users\DELL\anaconda3\Lib\site-packages\~-learn\.libs\vcomp140.dll' Consider using the
--user
option or check the permissions.
But still it gives me the needed output without any error. If I check the version of sklearn it shows me 0.22 even if there was error installing it.
quote C:\Users\DELL\anaconda3\lib\site-packages\sklearn\base.py:313: UserWarning: Trying to unpickle estimator ExtraTreesClassifier from version 0.22.2 post1 when using version 0.22. This might lead to breaking code or invalid results. Use at your own risk.
And this process is going on vice-versa(0.22.2 to 0.22 and 0.22 to 0.22.2) if I install or uninstall accordingly.
Though that I have seen various answers regarding this warning on Stackoverflow and worked upon as above, somehow I am unable to fix it and keep on getting this warning again and again or may be I am missing something. Even if I install Anaconda 2019.10 (Python 3.7.4 64 bit) this incompatibility issue still persist. I get the required output but at the back of my mind I am doubtful what if the output generated is not correct because of such warnings and incompatible versions. It is not possible to train all these models again due to time constraints or should I forget about warnings and go ahead and do the predictions with the trained models that I have. Please help. Thanks a lot.
Upvotes: 4
Views: 10047
Reputation: 45
pip install scikit-learn==0.22.2.post1
resolved a similar issue for me.
Upvotes: 3