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

Fixing #13381 #13400

Merged
Merged

Conversation

Narsil
Copy link
Contributor

@Narsil Narsil commented Sep 3, 2021

What does this PR do?

Fixes #13381

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.

Comment on lines +125 to +130
if "too short" in str(e):
# tokenizers might yell that we want to truncate
# to a value that is not even reached by the input.
# In that case we don't want to truncate.
# It seems there's not a really better way to catch that
# exception.
Copy link
Member

Choose a reason for hiding this comment

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

Could you provide a reproducer for this issue? I can't seem to find where that would come from

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basic test for the pipelines RUN_PIPELINE_TESTS=1 pytest -sv tests/test_pipelines_zero_shot_classification.py will do (on the LED test)

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.

Indeed, the error comes directly from the tokenizers library so there's not much we can do about it here. LGTM, thanks @Narsil!

@LysandreJik LysandreJik merged commit aacd212 into huggingface:master Sep 9, 2021
@Narsil Narsil deleted the fix_default_zero_cls_truncation branch September 10, 2021 07:36
patrickvonplaten pushed a commit that referenced this pull request Sep 10, 2021
* Fixing #13381

* Enabling automatic LED models.
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.

Zero-shot classification pipeline truncation support
2 participants