Skip to content

Conversation

@antznette1
Copy link
Contributor

Summary
This PR fixes a small typo in QuestionAnsweringPipeline._sanitize_parameters() where the ValueError raised for invalid max_answer_len was missing a closing parenthesis in the "(got ...)" portion of the message.

Changes

  • Fix malformed ValueError message for max_answer_len validation in:
    • src/transformers/pipelines/question_answering.py
  • Add a lightweight regression test (no model downloads) that asserts the error message is well-formed:
    • tests/pipelines/test_pipelines_question_answering.py

Testing

  • python -m pytest tests/pipelines/test_pipelines_question_answering.py -k sanitize_parameters_max_answer_len_error_message -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant