From 8a4121cbc2d48d24e8e3a2304f756d5977f7be5a Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 12 Mar 2019 13:32:56 +0100 Subject: [PATCH] Fix bug introduced by component_cfg --- spacy/language.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spacy/language.py b/spacy/language.py index e97b74a77..6432f3e98 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -900,6 +900,11 @@ class DisabledPipes(list): def _pipe(func, docs, kwargs): + # We added some args for pipe that __call__ doesn't expect. + kwargs = dict(kwargs) + for arg in ["n_threads", "batch_size"]: + if arg in kwargs: + kwargs.pop(arg) for doc in docs: doc = func(doc, **kwargs) yield doc