Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long QuestionAnsweringPipeline fix. #16778

Merged
merged 3 commits into from
Apr 21, 2022

Conversation

Narsil
Copy link
Contributor

@Narsil Narsil commented Apr 14, 2022

What does this PR do?

This handles CLS index even on splitted QA context.

TODO update the tests for one that actually showcases the bug.

Fixes #16769

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Narsil Narsil marked this pull request as draft April 14, 2022 10:53
@Narsil
Copy link
Contributor Author

Narsil commented Apr 14, 2022

@LysandreJik This is not fully ready yet as the test does not really check that the bug is fixed. Do you have any ideas on how to check that behavior ? (Previous code was just silently not doing anything since the np.arrays are an array of np.list(..) in the splitted case.)

Edit: It's not covered by a slow test. I am hesitant to remove the fast test because it does not cover this.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 14, 2022

The documentation is not available anymore as the PR was closed or merged.

@Narsil Narsil marked this pull request as ready for review April 14, 2022 13:38
@Narsil Narsil changed the title Temporary commit witht the long QA fix. Long QuestionAnsweringPipeline fix. Apr 14, 2022
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! If you think the fast test is unnecessary, ok for me to remove it and keep the slow test only.

Feel free to merge when ready!

@Narsil
Copy link
Contributor Author

Narsil commented Apr 21, 2022

I'll remove the fast test, don't want to leave a false sense of security here.

@Narsil Narsil merged commit 6620f60 into huggingface:main Apr 21, 2022
@Narsil Narsil deleted the fix_qa_pipeline_long_cls branch April 21, 2022 07:59
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
* Temporary commit witht the long QA fix.

* Adding slow tests covering this fix.

* Removing fast test as it doesn't fail anyway.
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.

Invalid CLS masking in question answer pipelines top K calculation
3 participants