OSError: [E053] Could not read meta.json from tmp_model

I'm following the "Training a NAMED ENTITY RECOGNITION MODEL with Prodigy and Transfer Learning" tutorial and I ran the following commands successfully:

prodigy ner.manual school_data blank:en texts_containing_school_stuff.txt --label SCHOOL --patterns ./school_problems/school_pattern_file.jsonl
prodigy train --ner school_data ./tmp_model --eval-split 0.2 --label-stats
prodigy train-curve ner school_data --eval-split 0.2

When I run:

prodigy ner.correct school_data_correct ./tmp_model texts_containing_school_stuff.txt --label SCHOOL --exclude school_data

I get the following error:

OSError: [E053] Could not read meta.json from tmp_model

Here is a screenshot of my working directory where the temp_model folder lives:

Screenshot 2021-12-16 at 10.18.37

... and here is what's in the tmp_model folder:

Screenshot 2021-12-16 at 10.18.49

Please could you help me to understand what I've done wrong and what I need to do instead?

Hi @nicfox :slight_smile:

So the tmp_folder as you've mentioned contains the models model-best and model-last. You should pass one of these directories (preferably, model-best) as your input in the CLI. Something like this:

prodigy ner.correct school_data_correct ./tmp_model/model_best ...

To clarify further:

  • model-best contains the most high-performing model during the whole training run. The training command will always save a snapshot of that model.
  • model-last contains the latest model that was trained. This may not always be the high-performing one, but we save it there so that if you wish to "resume" your training, you can do so.
1 Like

That worked! Thank you so much :hugs:

1 Like