From 87ddbdc33e362336b060e0cb95f8adb008d5f29f Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sun, 4 Aug 2019 13:44:21 +0200 Subject: [PATCH] Fix handling of kwargs in Language.evaluate Makes it consistent with other methods --- spacy/language.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/language.py b/spacy/language.py index b839be1f6..f87cb4e31 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -633,7 +633,7 @@ class Language(object): kwargs = component_cfg.get(name, {}) kwargs.setdefault("batch_size", batch_size) if not hasattr(pipe, "pipe"): - docs = (pipe(doc, **kwargs) for doc in docs) + docs = _pipe(pipe, docs, kwargs) else: docs = pipe.pipe(docs, **kwargs) for doc, gold in zip(docs, golds):