mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Skip vocab in component config overrides (#5624)
This commit is contained in:
parent
7ce451c211
commit
6fe6e761de
|
@ -208,6 +208,10 @@ def load_model_from_path(model_path, meta=False, **overrides):
|
||||||
pipeline = nlp.Defaults.pipe_names
|
pipeline = nlp.Defaults.pipe_names
|
||||||
elif pipeline in (False, None):
|
elif pipeline in (False, None):
|
||||||
pipeline = []
|
pipeline = []
|
||||||
|
# skip "vocab" from overrides in component initialization since vocab is
|
||||||
|
# already configured from overrides when nlp is initialized above
|
||||||
|
if "vocab" in overrides:
|
||||||
|
del overrides["vocab"]
|
||||||
for name in pipeline:
|
for name in pipeline:
|
||||||
if name not in disable:
|
if name not in disable:
|
||||||
config = meta.get("pipeline_args", {}).get(name, {})
|
config = meta.get("pipeline_args", {}).get(name, {})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user