Skip to content

Commit

Permalink
Fix a bug that ignores max_seq_len in preprocess (#15238)
Browse files Browse the repository at this point in the history
  • Loading branch information
wptoux authored Feb 14, 2022
1 parent f52746d commit 2b8599b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/transformers/pipelines/question_answering.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ def _sanitize_parameters(
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:
Expand Down

0 comments on commit 2b8599b

Please sign in to comment.