Error message W036 entity_ruler - Train custom NER model in combination with entity ruler #9251
-
Hi! I have created a gold standard dataset with a custom model in prodigy (ner.correct PERSON/EMAIL) and I would now like to train/optimise the PERSONs and evaluate the EMAIL recognition with spaCy. In parallel, I would like to log and optimise via W&B.
The training with prodigy and the evaluation of the entity ruler with spaCy works perfectly. I don't get any error messages, but unfortunately I can't log and sweep with W&B, so I would like to build up the training process with spaCy. I have therefore pepared the config.cfg according to the documentation and I hope I have done it correctly. I think it has something to do with the initialisation. But according to the documentation it is done automatically when I start the training. The spaCy train log also does not contain the initialisation of the entity ruler:
What am I doing wrong? Thanks a lot for your support! Custom model:
config.cfg:
Prodigy train: ========================= Generating Prodigy config ========================= =========================== Initializing pipeline ===========================
============================= Training pipeline =============================
0 0 0.00 12.23 65.52 54.29 82.61 0.00 0.00 0.00 0.16 spaCy train: =========================== Initializing pipeline =========================== ============================= Training pipeline ============================= wandb: Tracking run with wandb version 0.12.2 E # LOSS TOK2VEC LOSS NER SENTS_F SENTS_P SENTS_R ENTS_F ENTS_P ENTS_R SCORE C:\Miniconda3\lib\site-packages\spacy\pipeline\entityruler.py:335: UserWarning: [W036] The component 'entity_ruler' does not have any patterns defined. C:\Miniconda3\lib\site-packages\spacy\pipeline\entityruler.py:335: UserWarning: [W036] The component 'entity_ruler' does not have any patterns defined. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
The entity ruler in your config is being defined from scratch and it isn't reading anything from the saved custom model. You can |
Beta Was this translation helpful? Give feedback.
The entity ruler in your config is being defined from scratch and it isn't reading anything from the saved custom model.
You can
source
the entity ruler from the saved custom model (probably the easiest change here) or you can initialize it in the[initialize]
block: https://spacy.io/api/entityruler#init