8000 Can't reload old model with joblib · Issue #14724 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
Can't reload old model with joblib #14724
Closed
@weber8thomas

Description

@weber8thomas

Hello everyone,

I have a problem with the update that consists to call directly joblib instead of calling it from sklearn.externals.

Here's my issue :

I stored a model with scikit version 0.20.3 by using scikit.externals joblib dump function. I updated my packages and it's now not possible to retrieve my model.

Traceback (most recent call last):
  File "/gstock/biolo_datasets/variation/benchmark/RADMEL/FINAL_DATA/VarClass_RADMEL/VarClass.py", line 617, in <module>
    testing(arg_dict)
  File "/gstock/biolo_datasets/variation/benchmark/RADMEL/FINAL_DATA/VarClass_RADMEL/VarClass.py", line 115, in testing
    threshold=ARGS['threshold']
  File "/enadisk/gstock/biolo_datasets/variation/benchmark/RADMEL/FINAL_DATA/VarClass_RADMEL/VarClass_scripts/testing.py", line 57, in __init__
    classifiers = self.load_classifiers(model_dir=model)
  File "/enadisk/gstock/biolo_datasets/variation/benchmark/RADMEL/FINAL_DATA/VarClass_RADMEL/VarClass_scripts/testing.py", line 82, in load_classifiers
    sk_model = joblib.load(mod)
  File "/home/weber/anaconda3/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 598, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/home/weber/anaconda3/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 526, in _unpickle
    obj = unpickler.load()
  File "/home/weber/anaconda3/lib/python3.7/pickle.py", line 1088, in load
    dispatch[key[0]](self)
  File "/home/weber/anaconda3/lib/python3.7/pickle.py", line 1376, in load_global
    klass = self.find_class(module, name)
  File "/home/weber/anaconda3/lib/python3.7/pickle.py", line 1426, in find_class
    __import__(module, level=0)
ModuleNotFoundError: No module named 'sklearn.ensemble.voting_classifier'

I think the problem comes from a mispelling link to the last line above. In documentation, the class is called by the following :
from sklearn.ensemble import VotingClassifier

Thanks in advance for your help !

Best regards,

Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0