From 02838a1d470d08ab381524bb1d857a61366759ac Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 28 Sep 2020 15:27:10 +0200 Subject: [PATCH] Fix resolve_dot_names --- spacy/util.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spacy/util.py b/spacy/util.py index 9d7199d7f..f9d9e6495 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -379,9 +379,7 @@ def load_model_from_config( return nlp -def resolve_dot_names( - config: Config, dot_names: List[Optional[str]] -) -> Tuple[Any]: +def resolve_dot_names(config: Config, dot_names: List[Optional[str]]) -> Tuple[Any]: """Resolve one or more "dot notation" names, e.g. corpora.train. The paths could point anywhere into the config, so we don't know which top-level section we'll be looking within. @@ -410,8 +408,7 @@ def resolve_dot_names( objects = [] for ref in output: if not isinstance(ref, str): - msg = f"not a valid section reference: {ref} ({type(ref)})" - errors.append({"loc": ref.split("."), "msg": msg}) + objects.append(ref) continue section = ref.split(".")[0] # We want to avoid resolving the same thing twice