Fix divide by zero

This commit is contained in:
Matthw Honnibal 2020-07-20 22:08:38 +02:00
parent 377108998a
commit 357d4e6293

View File

@ -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)