From 563a21834e111728cb8804424d173eb14d90ef85 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 19 Oct 2020 15:03:19 +0200 Subject: [PATCH] Save raw scores in evaluate output --- spacy/cli/evaluate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/cli/evaluate.py b/spacy/cli/evaluate.py index 999c68be3..018f81bd0 100644 --- a/spacy/cli/evaluate.py +++ b/spacy/cli/evaluate.py @@ -93,6 +93,7 @@ def evaluate( "SPEED": "speed", } results = {} + data = {} for metric, key in metrics.items(): if key in scores: if key == "cats_score": @@ -101,7 +102,7 @@ def evaluate( results[metric] = f"{scores[key]:.0f}" else: results[metric] = f"{scores[key]*100:.2f}" - data = {re.sub(r"[\s/]", "_", k.lower()): v for k, v in results.items()} + data[re.sub(r"[\s/]", "_", key.lower())] = scores[key] msg.table(results, title="Results")