From 273e6381839d810a81b281d2c4315d132e5f2bfb Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 25 Oct 2017 16:03:05 +0200 Subject: [PATCH] Add vector data to model meta after training (see #1457) --- spacy/cli/train.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index 2faea72e7..026b1fe44 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -144,7 +144,10 @@ def train(cmd, lang, output_dir, train_data, dev_data, n_iter=30, n_sents=0, file_.write(json_dumps(scorer.scores)) meta_loc = output_path / ('model%d' % i) / 'meta.json' meta['accuracy'] = scorer.scores - meta['speed'] = {'nwords': nwords, 'cpu':cpu_wps, 'gpu': gpu_wps} + meta['speed'] = {'nwords': nwords, 'cpu': cpu_wps, + 'gpu': gpu_wps} + meta['vectors'] = {'entries': nlp.vocab.vectors_length, + 'width': 0} meta['lang'] = nlp.lang meta['pipeline'] = pipeline meta['spacy_version'] = '>=%s' % about.__version__