Read the docs on model persistence, specifically:
When an estimator is unpickled with a scikit-learn version that is inconsistent with the version the estimator was pickled with, a
InconsistentVersionWarning
is raised. This warning can be caught to obtain the original version the estimator was pickled with:from sklearn.exceptions import InconsistentVersionWarning warnings.simplefilter("error", InconsistentVersionWarning) try: est = pickle.loads("model_from_prevision_version.pickle") except InconsistentVersionWarning as w: print(w.original_sklearn_version)
Keep reading for ways to avoid or mitigate issues like this in the future.