Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError - Possible joblib version mismatch #1

Open
viniciusarruda opened this issue Sep 6, 2022 · 0 comments
Open

KeyError - Possible joblib version mismatch #1

viniciusarruda opened this issue Sep 6, 2022 · 0 comments

Comments

@viniciusarruda
Copy link

Hi,

I'm trying to use your trained models, however, I am getting an error for the unigram model:

Traceback (most recent call last):
File "eval.py", line 216, in
main()
File "eval.py", line 206, in main
nltk_preds = predict_nltk(macmorpho['corpus'])
File "eval.py", line 101, in predict_nltk
tagger = joblib.load(folder + pkl_file)
File "/usr/local/lib/python3.8/dist-packages/joblib/numpy_pickle.py", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/usr/local/lib/python3.8/dist-packages/joblib/numpy_pickle.py", line 506, in _unpickle
obj = unpickler.load()
File "/usr/lib/python3.8/pickle.py", line 1212, in load
dispatchkey[0]
KeyError: 35

I found this answer at stack overflow: https://stackoverflow.com/questions/48948209/keyerror-when-loading-pickled-scikit-learn-model-using-joblib and maybe this can be the issue.

I was using joblib version 1.1.0 when I got the error. Downgrading to version 1.0.0 also throws the same error.

I think that the ideal scenario is to use the same version used to build and dump the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant