# Error loading prodigy model

**URL:** <https://support.prodi.gy/t/error-loading-prodigy-model/4777>\
**Category:** Uncategorized\
**Tags:** ner, spacy, to-be-released, transformers\
**Created:** [October 7, 2021, 10:51am UTC](https://support.prodi.gy/t/error-loading-prodigy-model/4777 "2021-10-07T10:51:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raishalini](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/raishalini/32/2463_2.png) [@raishalini](https://support.prodi.gy/u/raishalini)\
**Post date:** [October 7, 2021, 10:51am UTC](https://support.prodi.gy/t/error-loading-prodigy-model/4777/1 "2021-10-07T10:51:03Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/c/cf23bde06eeb4070a98d2302216b4a6386e6efa4.png)

Model is trained and loaded in the same environment.  
Some info about prodigy and spacy versions installed:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/b/b03eceacfbbd7e95d2d2ca0765b22064f54c060f.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/6/62d9953b1874aae84a2e4ce124f9a26fe7d81568.png)

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?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [October 8, 2021, 9:09am UTC](https://support.prodi.gy/t/error-loading-prodigy-model/4777/2 "2021-10-08T09:09:59Z")

</div>

Hi! It looks like you're hitting the same problem described in [this thread](https://support.prodi.gy/t/cannot-deserialize-model-error-when-loading-retrained-transformer-model/4774). See here for a workaround:

> [@"Cannot deserialize model" error when loading retrained transformer model](https://support.prodi.gy/t/cannot-deserialize-model-error-when-loading-retrained-transformer-model/4774/2):
>
> 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](https://github.com/explosion/spaCy/issues/8319) 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!

---

<div class="post-metadata">

**Author:** ![raishalini](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/raishalini/32/2463_2.png) [@raishalini](https://support.prodi.gy/u/raishalini)\
**Post date:** [October 8, 2021, 10:36am UTC](https://support.prodi.gy/t/error-loading-prodigy-model/4777/3 "2021-10-08T10:36:34Z")

</div>

Thank you! Will check out the dev version.
