mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 21:54:54 +03:00
Change check of if there's only one unique value in scores.
This commit is contained in:
parent
5de02dc903
commit
34c6c3b7c9
|
@ -193,7 +193,7 @@ def find_threshold(
|
|||
best_threshold = max(scores.keys(), key=(lambda key: scores[key]))
|
||||
|
||||
# If all scores are identical, emit warning.
|
||||
if all([score == scores[thresholds[0]] for score in scores.values()]):
|
||||
if len(set(scores.values())) == 1:
|
||||
wasabi.msg.warn(
|
||||
title="All scores are identical. Verify that all settings are correct.",
|
||||
text=""
|
||||
|
|
Loading…
Reference in New Issue
Block a user