Correcting trained model fails.

I manually annotated a set of data, and then trained a model using

prodigy train model --ner dataset,eval:eval-dataset -m en_core_web_trf --gpu-id 0

I then try to use the trained model with

 prodigy ner.correct new-dataset model/model-best/ ~/data/data.jsonl --exclude dataset 

Which gives:

ValueError: Cannot deserialize model: mismatched structure

This seems to be the same problem as NER training produces invalid config.cfg? - #4 by bob_ln. Is there a workaround that would allow me to correct this trained model? I tried removing tagger, parser, attribute_ruler from pipeline in config.cfg, which allows the model to load, but results in loads of warnings.

Hi! Sorry about that. The problem here are the frozen components in your pipeline so after upgrading spacy-transformers you should be able to just use the same workaround @SofieVL provided in the thread and re-source the components from the pipeline you want to keep:

That worked, thanks :).

Hi, I'm doing basically the same thing but can't work out how to alter the config so that it works.

I can follow the instructions in a .py file and the model loads - and looks like it's doing well - but not with the ner.correct

Would some kind soul put me out of my misery please?

M

Thanks!

OK, I have this working now by disabling some components in the [nlp] section, then loading replacements in the [components] section.

Is this the intended approach?

Though I get a warning about 'automatically converting a transformer component from v1 to v1.1. Doesn't say which one though...

Thanks!

M