From 27a1cd3c630055802513a20c1e75d0b37943cc39 Mon Sep 17 00:00:00 2001 From: Mark Neumann Date: Sun, 12 Jul 2020 13:06:46 -0700 Subject: [PATCH] fix meta serialization in train (#5751) Co-authored-by: Mark Neumann --- spacy/cli/train.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index fc4c9f67b..b81214b95 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -576,6 +576,8 @@ def train( with nlp.use_params(optimizer.averages): final_model_path = output_path / "model-final" nlp.to_disk(final_model_path) + srsly.write_json(final_model_path / "meta.json", meta) + meta_loc = output_path / "model-final" / "meta.json" final_meta = srsly.read_json(meta_loc) final_meta.setdefault("accuracy", {})