Training NER model error "Could not find an optimal move to supervise the parser" #10584
Unanswered
JessitaMS
asked this question in
Help: Coding & Implementations
Replies: 1 comment 1 reply
-
Hello, We've mentioned this in many other questions you've asked, but please don't paste screenshots of text. It makes the text hard to read and impossible to search for later. It also makes it hard to test your code. Please copy and paste code, error messages, or other text as text. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Although the title may be the same as a previously opened discussion, I haven't found a solution yet for the problem I'm facing:
My JSON file has the following format:

With which with the following code I convert it to spacy format:
**for text, annot in tqdm(TRAIN_DATA['annotations']):
doc = nlp.make_doc(text)
ints = []
for start, end, label in annot["entities"]:
span = doc.char_span(start, end, label=label, alignment_mode="contract")
if span is None:
print("Skipping entity")
else:
ents.append(span)
doc.ents = ents
db.add(doc)
#Save the docbin object
db.to_disk("./training_data.spacy")**
But when it comes to training the model, with the following line of code:
!python -m spacy train config.cfg --output ./ --paths.train ./training_data.spacy --paths.dev ./training_data.spacy
I get the error:

The strangest thing that happens to me is that this error only appears on the notebooks that I have on my PC, however, it runs on Google Colab (that is, if it were a blank space type error as commented in the issue with the same old name) em should not work there either. Problem that we are facing, the one that we all know the GoogleColab stops at a certain time, and that is why I want to run it on my PC.
Beta Was this translation helpful? Give feedback.
All reactions