Skip to content

DocumentQuestionAnsweringPipeline only for fast ⚡ tokenizers#22745

Merged
ydshieh merged 6 commits intomainfrom
better_error
Apr 13, 2023
Merged

DocumentQuestionAnsweringPipeline only for fast ⚡ tokenizers#22745
ydshieh merged 6 commits intomainfrom
better_error

Conversation

@ydshieh
Copy link
Copy Markdown
Collaborator

@ydshieh ydshieh commented Apr 13, 2023

What does this PR do?

So let's make this more clear and explicit.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Apr 13, 2023

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

return True

return False

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy link
Copy Markdown

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