KeyError: 'score' in ner.teach While trying to do this on pre-annotated data.

Hi @ines

I am following this to load the pre-annotated data.
Does Prodigy load pre-annotated data? - Prodigy Support

the data format I have pushed in db is same as mentioned in the link.
"text":"Pumped 18 M3 1,45 SG EZ spot pill, displaced same with 18 M3 1,4 SG mud. Spotted 10,3 M3 around BHA, left 7,7 M3 inside pipe.",

  • Since ner.batch-train is depreciated I am using ner train.
  • and ner.teach as:


prodigy ner.teach scrapinghub_golden trained_models/scrapinghub_model_v1/ scrapinghub_goldendata.jsonl --label CAST_CREW,PERSON,EXECUTIVE_NAME,CONTENTNAME,COMPANY,DATE,LOCATION,LICENSE_TERR,MONEY,COUNTRY

And getting KeyError: 'score' for this.

had a look on this, but eliminating spans from .jsonl will not bring my pre-annotations.

  1. I had also tried using:
    PRODIGY_PORT=5000 prodigy ner.manual scrapinghub_golden trained_models/scrapinghub_model_v1/ scrapinghub_goldendata.jsonl --label CAST_CREW,PERSON,EXECUTIVE_NAME,CONTENTNAME,CARDINAL,ORDINAL,COMPANY,DATE,LOCATION,DEAL_VAL,LICENSE_TERR,COUNTRY,MONEY,BOOK_NAME,WORKING_TITLE

this generates "No available task" page.

Could you please help?


The problem here goes a bit deeper: the ner.teach recipe is designed to show you binary suggestions based on the model's predictions. So there's not really a point in feeding it pre-annotated data because it's all about showing you very specific selected predictions. If you want to annotate pre-labelled examples and correct them, you should use a recipe like ner.manual instead.

This is shown if there are no examples left to annotate. This can happen if your dataset (e.g. scrapinghub_golden) already contains annotations for all of the examples you're loading in. In that case, Prodigy will skip the annotations that already exist. If you want to re-annotate your data, you should use a new and empty dataset.