NER and Relation Extraction pipeline: Could not determine any instances in doc. #8499
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
This pipeline component currently doesn't support training on NER and REL at the same time - instead it assumes that gold entities are already present when training the REL component. The underlying reason is that in spaCy 3.0, components are updated in isolation during training, which means that they don't see the predictions of any earlier components in the pipeline. In the upcoming 3.1, this mechanism will become more transparent & extensible, and you'll be able to specify components that should set annotations on the predicted docs during training, so that downstream components can use those predictions as features or to build on them. In that case, you'd be able to use the predicted entities to train the REL. For now, my advice would be to have a two-step training procedure: first create & train an NER that identifies all candidate mentions for your relations, then in a next step train a REL component that decides whether a link is correct or not. For the latter, you'll want to create a custom reader that already sets the |
Beta Was this translation helpful? Give feedback.

This pipeline component currently doesn't support training on NER and REL at the same time - instead it assumes that gold entities are already present when training the REL component.
The underlying reason is that in spaCy 3.0, components are updated in isolation during training, which means that they don't see the predictions of any earlier components in the pipeline.
In the upcoming 3.1, this mechanism will become more transparent & extensible, and you'll be able to specify components that should set annotations on the predicted docs during training, so that downstream components can use those predictions as features or to build on them. In that case, you'd be able to use the predicted …