From 6f551043e4dd2f248d8c2a62f0489fea437c999d Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 4 Feb 2022 21:09:48 +0100 Subject: [PATCH] Use paths.vectors for vectors in init config (#10146) So that overriding `paths.vectors` works consistently in generated configs, set vectors model in `paths.vectors` and always refer to this path in `initialize.vectors`. --- spacy/cli/templates/quickstart_training.jinja | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spacy/cli/templates/quickstart_training.jinja b/spacy/cli/templates/quickstart_training.jinja index b78806fec..fb79a4f60 100644 --- a/spacy/cli/templates/quickstart_training.jinja +++ b/spacy/cli/templates/quickstart_training.jinja @@ -6,6 +6,11 @@ can help generate the best possible configuration, given a user's requirements. [paths] train = null dev = null +{% if use_transformer or optimize == "efficiency" or not word_vectors -%} +vectors = null +{% else -%} +vectors = "{{ word_vectors }}" +{% endif -%} [system] {% if use_transformer -%} @@ -421,8 +426,4 @@ compound = 1.001 {% endif %} [initialize] -{% if use_transformer or optimize == "efficiency" or not word_vectors -%} vectors = ${paths.vectors} -{% else -%} -vectors = "{{ word_vectors }}" -{% endif -%}