Training the SpanCategorizer via the Update method #10480
-
Currently, we've been experimenting with the excellent new SpanCategorizer pipeline in preparation for starting a more extensive annotation work with Prodigy. We are currently using the Update method. However, although the training happens for all iterations, the resulting model does not make any predictions. I'm guessing this is an issue with formatting the Examples training instances. In particular, we are unclear on storing the annotated spans in the Example instance.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Without getting into exactly what is going wrong here, is there a reason you're not using config-based training? We strongly recommend not writing your own training loop in order to avoid errors. If you don't want to use the config, we also expose the internal training loop as a function you can use. Also, it looks like something went wrong when you pasted your code and the indentation is off and maybe some parts are missing - you don't use |
Beta Was this translation helpful? Give feedback.
Without getting into exactly what is going wrong here, is there a reason you're not using config-based training? We strongly recommend not writing your own training loop in order to avoid errors. If you don't want to use the config, we also expose the internal training loop as a function you can use.
Also, it looks like something went wrong when you pasted your code and the indentation is off and maybe some parts are missing - you don't use
entity_offsets
and it's not clear whereannotations
is defined. Can you double-check your code?