Improve error message for weighted None score

This commit is contained in:
Ines Montani 2021-01-25 11:51:52 +11:00
parent 165ef60aa6
commit 7059926763

View File

@ -519,9 +519,13 @@ class Errors:
"return the nlp object but got: {value}. Maybe you forgot to return "
"the modified object in your function?")
E915 = ("Can't use score '{name}' to calculate final weighted score. Expected "
"float or int but got: {score_type}. To exclude the score from the "
"final score, set its weight to null in the [training.score_weights] "
"section of your training config.")
"float or int returned by nlp.evaluate but got: {score_type}. This "
"can happen if your evaluation data doesn't contain any examples for "
"the given annotation type, so the score for it can't be included in "
"the final weighted score. If this is surprising, double-check your "
"evaluation data. If this is expected, exclude the score from the "
"final score by setting its weight to null in the "
"[training.score_weights] section of your training config.")
E916 = ("Can't log score for '{name}' in table: not a valid score ({score_type})")
E917 = ("Received invalid value {value} for `state_type` in "
"TransitionBasedParser: only 'parser' or 'ner' are valid options.")