Ner teach not working

Okay - yes, I had to modify your .jsonl a bit for formatting, but yes, when I used this data:

{"text": "blabla \"A\" FAULT", "meta": {"id": "id1"}}
{"text": "bla", "meta": {"id": "id2"}}
{"text": "blablabla", "meta": {"id": "id6"}}

and I ran this command (since I didn't have your model used in the recipe, I used en_core_web_sm as an alternative):

python -m prodigy ner.teach sample en_core_web_sm data/sample.jsonl --label PERSON 

I got this error:

✘ Error while validating stream: no first example
This likely means that your stream is empty.This can also mean all the examples
in your stream have been annotated in datasets included in your --exclude recipe
parameter.

However, like the error says, I think the problem is that you're not getting any predicted entities or pattern matches, hence the stream is empty.

For example, if I modify the data to:

{"text": "blabla \"A\" FAULT", "meta": {"id": "id1"}}
{"text": "Joe Biden is president of the United States.", "meta": {"id": "id2"}}
{"text": "blablabla", "meta": {"id": "id6"}}

It does load up one example.

I suspect your problem is not enough of the predictions on your data is hitting the active learning criteria. ner.teach is really just running this (if we ignore patterns):

from prodigy.components.sorters import prefer_uncertain

def score_stream(stream):
    for example in stream:
        score = model.predict(example["text"])
        yield (score, example)

stream = prefer_uncertain(score_stream(stream))

When you run this, prefer_uncertain isn't returning any of your predictions from your stream as the default algorithm ema. It tracks the exponential moving average of the uncertainties, and also tracks a moving variance. It then asks questions which are one standard deviation or more above the current average uncertainty.

What you may want to do is modify the algorithm (or bias sorter) in the function prefer_uncertain.

Here's more of a background:

FYI to find your local recipe, run python -m prodigy stats, find your Location: path, then find the file recipes/ner.py where you'll find where ner.teach is defined. You can then either modify it directly or copy it to create your modified ner.teach recipe where you can try out a modified version.

Hope this helps!