mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 21:54:54 +03:00
Update spacy/cli/find_threshold.py
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
This commit is contained in:
parent
65e41a52dd
commit
604c5eab3d
|
@ -167,9 +167,7 @@ def find_threshold(
|
|||
)
|
||||
|
||||
scores[threshold] = nlp.evaluate(dev_dataset)[scores_key]
|
||||
if not isinstance(scores[threshold], float) and not isinstance(
|
||||
scores[threshold], int
|
||||
):
|
||||
if not isinstance(scores[threshold], (float, int)):
|
||||
wasabi.msg.fail(
|
||||
f"Returned score for key '{scores_key}' is not numeric. Threshold optimization only works for numeric "
|
||||
f"scores.",
|
||||
|
|
Loading…
Reference in New Issue
Block a user