From 357d4e629325d530401ecb1e669c65a9d23922b6 Mon Sep 17 00:00:00 2001 From: Matthw Honnibal Date: Mon, 20 Jul 2020 22:08:38 +0200 Subject: [PATCH] Fix divide by zero --- spacy/cli/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index fde88d97c..682fafb9a 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -587,7 +587,7 @@ def setup_printer(training, pipe_names): + losses + scores + ["{0:.2f}".format(float(info["score"]))] - + ["%d" % (info["words"] / info["seconds"])] + + ["%d" % (info["words"] / (info["seconds"] + 1e-6))] ) msg.row(data, widths=table_widths, aligns=table_aligns)