scikit-learn dependency version may need to be fixed
Closed this issue · 3 comments
Hello,
while testing a fresh install of bacphlip I had this warniing message
/tmp/tt/lib/python3.7/site-packages/scikit_learn-0.23.1-py3.7-linux-x86_64.egg/sklearn/base.py:334: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.23.0 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk.
forcing installation of scikit-learn version 0.23.0 solved the problem, no longer warning at run time.
regards
Eric
Thanks again for this comment, I'm aware of this annoyance and just haven't found a suitable fix yet. Basically I personally HATE when tools have old dependencies so when you install them your system install of some other package will get rolled back so I'm really resistant to doing that.
But unfortunately scikit-learn gives that same error with every minor release they have if the initial model is constructed / trained on one release and then imported into another release. Hope there is a fix for this that I just haven't found yet but at the moment I think I'm just going to live with the run time warning. Will keep you posted if I find a solution, and thanks again for all the feedback.
no problem. thanks for the comment
Also decided to just require scikit-learn 0.23 for the time being rather than let that warning scare users. Will try and keep it up to date by re-running and saving the underlying model with any major scikit-learn releases so that it's dependency is always the newest major release. Seems like model persistence in these models across versions is a long standing unsolved issue. Thanks again for your help.