mirror of https://github.com/explosion/spaCy.git
Dont load vectors in Language.from_config
This commit is contained in:
parent
30dd96c540
commit
7299419fe4
|
@ -1408,8 +1408,10 @@ class Language:
|
||||||
nlp = cls(
|
nlp = cls(
|
||||||
create_tokenizer=create_tokenizer, create_lemmatizer=create_lemmatizer,
|
create_tokenizer=create_tokenizer, create_lemmatizer=create_lemmatizer,
|
||||||
)
|
)
|
||||||
if config["training"]["vectors"] is not None:
|
# Note that we don't load vectors here, instead they get loaded explicitly
|
||||||
util.load_vectors_into_model(nlp, config["training"]["vectors"])
|
# inside stuff like the spacy train function. If we loaded them here,
|
||||||
|
# then we would load them twice at runtime: once when we make from config,
|
||||||
|
# and then again when we load from disk.
|
||||||
pipeline = config.get("components", {})
|
pipeline = config.get("components", {})
|
||||||
for pipe_name in config["nlp"]["pipeline"]:
|
for pipe_name in config["nlp"]["pipeline"]:
|
||||||
if pipe_name not in pipeline:
|
if pipe_name not in pipeline:
|
||||||
|
|
Loading…
Reference in New Issue