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

DocumentQuestionAnsweringPipeline only for fast ⚡ tokenizers #22745

Merged
merged 6 commits into from
Apr 13, 2023

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Apr 13, 2023

What does this PR do?

So let's make this more clear and explicit.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 13, 2023

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

return True

return False

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See the change in tests/test_pipeline_mixin.py

return False
return super().is_pipeline_test_to_skip(
pipeline_test_casse_name, config_class, model_architecture, tokenizer_name, processor_name
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

need to call super()

):
# This pipeline uses `sequence_ids()` which is only available for fast tokenizers.
return True

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A place where the logic doesn't rely on the model classes

@ydshieh ydshieh requested review from Narsil and sgugger April 13, 2023 14:21
Copy link
Contributor

@Narsil Narsil left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot!

@ydshieh ydshieh merged commit 32b0874 into main Apr 13, 2023
@ydshieh ydshieh deleted the better_error branch April 13, 2023 15:23
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
…ngface#22745)

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
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.

4 participants