Support for custom scoring #8125
Replies: 1 comment 2 replies
-
In spaCy v3.x each component provides its own scoring method, so there's not a single config setting that can be overridden to use, e.g., within Currently, I think the best way to implement this with The other main alternative is to create a custom training loop (as an alternative to using In general, I think that scoring separately for custom scoring methods is going to be easier in a lot of cases, but obviously if you want these scores to be used for early stopping, then you'd need to use custom code during training. Luckily extending |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I haven't come across any easy way to implement a custom scorer. For me, there are three metrics I am concerned with:
Each of these are for different applications; just mentioning them to highlight that there might be gaps in scoring as is.
It's not a huge deal to run a separate script after training to do the evaluation, but given that the API / config system as a whole is pretty sleek, I was thinking it would be nice to be able to specify a scorer as part of a config.
I've seen in https://spacy.io/api/language#evaluate that there is already a way to specify a scorer in code. I'm thinking if we could source custom code in the config, it would be pretty useful.
I'm thinking this might be an additional field in the config like
Benefit of all this could be ensuring future evaluation of the pipeline is consistent according to the user's use case.
Beta Was this translation helpful? Give feedback.
All reactions