# NER training produces invalid config.cfg?

**URL:** <https://support.prodi.gy/t/ner-training-produces-invalid-config-cfg/4642>\
**Category:** Uncategorized\
**Tags:** spacy, solved, to-be-released, transformers, training\
**Created:** [September 1, 2021, 4:28pm UTC](https://support.prodi.gy/t/ner-training-produces-invalid-config-cfg/4642 "2021-09-01T16:28:27Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![SofieVL](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/sofievl/32/915_2.png) [@SofieVL](https://support.prodi.gy/u/SofieVL)\
**Post date:** [September 2, 2021, 9:27pm UTC](https://support.prodi.gy/t/ner-training-produces-invalid-config-cfg/4642/7 "2021-09-02T21:27:43Z")

</div>

Hi Bob,

Thanks for your patience and retrying - it seems like there are in fact 2 different bugs at play here. Fortunately, I do have some good news:

You shouldn't have lost the training hours. The loading of the model goes wrong for the frozen components in your pipeline - i.e. those that you didn't retrain. This is the workaround:

```python
nlp = spacy.load(".../ner_20210830/model-best/", exclude="tagger,parser")
nlp_orig = spacy.load("en_core_web_trf")
nlp.add_pipe("parser", source=nlp_orig, after="transformer")
nlp.add_pipe("tagger", source=nlp_orig, after="parser")
doc = nlp("This should just run.")

```

(if you really only need the NER, you can just exclude all the other pipes, that's even easier)

Hopefully that at least makes sure you can keep working while we fix the (second) issue on our end!

---

_[View the full topic](https://support.prodi.gy/t/ner-training-produces-invalid-config-cfg/4642)._
