Fix bug introduced by component_cfg

This commit is contained in:
Matthew Honnibal 2019-03-12 13:32:56 +01:00
parent 70e5058d72
commit 8a4121cbc2

View File

@ -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