-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding custom metrics #1103
Comments
Hi Amit, Sockeye's loss functions are implemented in loss.py. You could use an existing loss function (e.g., MSELoss as a template for creating your own. You could also trace instances of If your metrics require decoding, you could add them to the checkpoint decoder's decode_and_evaluate method (after BLEU, chrF, etc.). These metrics will be reported for every checkpoint but Sockeye does not currently support optimizing them directly. Best, |
By optimizing in my case I meant early-stopping. I'll try to add to the decode and evaluate and see if I can then early stop on those |
You should be able to add your metric as a choice for --optimized-metric to enable using it for early stopping. One approach would be to do this first (add the name of your metric), start a training run with a tiny model, and see where it hits an error since your metric isn't yet implemented. This can identify where the next code change would be needed to support your metric. |
There are four metrics available here https://github.com/sign-language-processing/signwriting-evaluation that I would like to report.
How can I add custom metrics? (I would like to optimize for one of the metrics)
The text was updated successfully, but these errors were encountered: