raishalini
(Shalini Rai)
October 7, 2021, 10:51am
1
Hi, I'm trying to load a saved prodigy model using the command:
import spacy
nlp = spacy.load({model_path})
but receiving the following error:
Model is trained and loaded in the same environment.
Some info about prodigy and spacy versions installed:
Model is trained using the following command:
python -m prodigy train {model storage location} --ner {dataset_name}--eval-split 0.2 --config config.cfg --base-model en_core_web_trf --gpu-id 0
What could be the reason for the error on top and where am I going wrong in this process?
ines
(Ines Montani)
October 8, 2021, 9:09am
2
Hi! It looks like you're hitting the same problem described in this thread . See here for a workaround:
Hi, I think this is the same issue as a known bug related to spacy-transformers: PyTorchWrapper causes error on deserializing · Issue #8319 · explosion/spaCy · GitHub
We're working on a fix in spacy-transformers. If you are very adventurous, you can try out the current dev version: pip install spacy-transformers==1.1.0.dev3. We should be pretty close to the final release, but want to do a bit more testing first. If you do try it out, let us know how it goes!
raishalini
(Shalini Rai)
October 8, 2021, 10:36am
3
Thank you! Will check out the dev version.