Open puranjay123 opened 2 years ago
Have you resolved this ? I'm also getting this issue.
There is a pickle version mismatch apparently pickle will not work if there is a different version . Try installing an older version which matches that version of the code. It should work.
I am having the same error,but I'm not able to install the older version of Sklearn so is there any other solution
@norobama1 you don't need to install an older version of sklearn , you need to install older/compatible version of pickle
When i tried to run the pickle file it is showing this error
UserWarning: Trying to unpickle estimator RandomForestClassifier from version 1.0.2 when using version 1.1.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations warnings.warn(
The solution that I found: Apparently pickle will not work with version mismatch either when there are minor changes it will not work because if we add or rename a field in a class then we cannot unpickle the previous version. it will change the structure of the library. according to this: https://github.com/scikit-learn/scikit-learn/issues/16033****PS: reply to this thread if anyone found a better approach to handle this issue.