Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
43a4e1bb
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "a175a9dc0188a367400c2121391fa3abf536748e"
Commit
43a4e1bb
authored
Dec 16, 2019
by
Morgan Funtowicz
Browse files
Adressing issue in varargs handling for question answering.
parent
46ccbb42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
transformers/pipelines.py
transformers/pipelines.py
+5
-2
No files found.
transformers/pipelines.py
View file @
43a4e1bb
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment