Issue
I have a big trained TfidfVectorizer dumped with joblib.dump. It was created on my laptop with scikit-learn version 0.18. When I'm trying to put it to my server where the newest version of scikit-learn 0.18.1 is installed I'm getting warned with the following:
/usr/local/lib/python2.7/dist-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator TfidfTransformer from version 0.18 when using version 0.18.1. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/usr/local/lib/python2.7/dist-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator TfidfVectorizer from version 0.18 when using version 0.18.1. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
Is there a natural way to upgrade my TfidfVectorizer to prevent any problems?
Should I better uninstall scikit-learn 0.18.1 and install version 0.18 to the server instead?
Solution
Yes you should install the same version on your server as you used for development, best practice is to use a requirements.txt
for all the requirements of your project and install a new environment on your server using conda
or virtualenv
, this will save you the problems of manually setting this stuff up.
Answered By - maxymoo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.