"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "a175a9dc0188a367400c2121391fa3abf536748e"
Commit 43a4e1bb authored by Morgan Funtowicz's avatar Morgan Funtowicz
Browse files

Adressing issue in varargs handling for question answering.

parent 46ccbb42
...@@ -293,8 +293,11 @@ class QuestionAnsweringPipeline(Pipeline): ...@@ -293,8 +293,11 @@ class QuestionAnsweringPipeline(Pipeline):
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
# Position args, handling is sensibly the same as X and data, so forwarding to avoid duplicating # Position args, handling is sensibly the same as X and data, so forwarding to avoid duplicating
if args is not None and len(args) > 1: if args is not None and len(args) > 0:
kwargs['X'] = args if len(args) == 1:
kwargs['X'] = args[0]
else:
kwargs['X'] = list(args)
# Generic compatibility with sklearn and Keras # Generic compatibility with sklearn and Keras
# Batched data # Batched data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment