Why labels from training data are added in "ner pipe" during incremental training? #12309
-
Currently I am trying to implement incremental training for
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @umayerreza, where are you pulling this code snippet from? It is indeed unnecessary to call If you know all your labels up front, you can simply call |
Beta Was this translation helpful? Give feedback.
Hi @umayerreza, where are you pulling this code snippet from? It is indeed unnecessary to call
add_label
with the same label over and over again. The function will check if the label is already known and won't do anything if it is, but you're right that it might still introduce a slight overhead. That said the overhead should only occur at the start of the training phase, and the actual training would be much longer in comparison. And you shouldn't have to do this at all when you're using the model for inference.If you know all your labels up front, you can simply call
add_label
for each of them once instead of looping through the training data.