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
2b8599b2
Unverified
Commit
2b8599b2
authored
Feb 14, 2022
by
Zhen Wang
Committed by
GitHub
Feb 14, 2022
Browse files
Fix a bug that ignores max_seq_len in preprocess (#15238)
parent
f52746d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/transformers/pipelines/question_answering.py
src/transformers/pipelines/question_answering.py
+2
-0
No files found.
src/transformers/pipelines/question_answering.py
View file @
2b8599b2
...
...
@@ -182,6 +182,8 @@ class QuestionAnsweringPipeline(ChunkPipeline):
preprocess_params
[
"doc_stride"
]
=
doc_stride
if
max_question_len
is
not
None
:
preprocess_params
[
"max_question_len"
]
=
max_question_len
if
max_seq_len
is
not
None
:
preprocess_params
[
"max_seq_len"
]
=
max_seq_len
postprocess_params
=
{}
if
topk
is
not
None
and
top_k
is
None
:
...
...
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