Set vectors.name when updating meta.json during training (#3100)

* Set vectors.name when updating meta.json during training

* add vectors name to meta in `spacy package`
This commit is contained in:
Jari Bakken 2018-12-27 19:55:40 +01:00 committed by Ines Montani
parent cc95167b6d
commit 0546135fba
2 changed files with 2 additions and 0 deletions

View File

@ -102,6 +102,7 @@ def generate_meta(model_path, existing_meta, msg):
"width": nlp.vocab.vectors_length,
"vectors": len(nlp.vocab.vectors),
"keys": nlp.vocab.vectors.n_keys,
"name": nlp.vocab.vectors.name,
}
msg.divider("Generating meta.json")
msg.text(

View File

@ -279,6 +279,7 @@ def train(
"width": nlp.vocab.vectors_length,
"vectors": len(nlp.vocab.vectors),
"keys": nlp.vocab.vectors.n_keys,
"name": nlp.vocab.vectors.name
}
meta.setdefault("name", "model%d" % i)
meta.setdefault("version", version)