F1 socre is zero while loss is about 0.12xx when using run_ner.py to fine tuning bert model
## ❓ Questions & Help

I want to use run_ner.py to do the sequence labeling work, and I make a few class of labels(e.g., B-School_name), then I annotate a few data (about 100 annotations for test) from dataset. Finally, I use run_ner.py to do the fine tuning job, but the f1 score and precision are both zero (but the loss is not). Have I got something wrong?
Hi @Sunnycheey I had the same issue when using my own data and labels. However, I fixed this once I ensured that the training data (train.txt) was in the correct format: WordToken/space/label, newline after every sentence (fullstop). 

While O
visiting O
Otonga B-Sc
primary I-Sc
he O
noticed O
an O
anomaly O
. O

The O
next O
sentence O
etc...


<|||||>Thanks for your reply. 

Is the fullstop matters? I use spacy to get sentences from document, so there may not be fullstop in the end of sentence...

BTW, I have used training dataset to test the model trained, and the f1 score is 1 (not 0)...<|||||>I got it to work with fullstop and newline as above.
I use stanfordnlp to prepare the data, but it is probably fine to use SpaCy.  Make sure you have a separate folder for the output too.<|||||>@jensam It turns out if all the predict result is O (in BIO annotation scheme), the f1 score tends to be 0.

Thanks anyway.