-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Adding some quality of life for pipeline
function.
#14322
Conversation
f62f1c5
to
3cfcdf3
Compare
3cfcdf3
to
f13cf26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those look like great improvements, thanks for adding support!
@require_torch | ||
def test_check_task_auto_inference(self): | ||
pipeline(model="Narsil/tiny-distilbert-sequence-classification") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check that the result has the right type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done it, thanks !
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
I'll merge ahead. |
What does this PR do?
Adds two quality of life things on
pipeline
function.task
optionalpipeline(model="gpt2")
should not be enough (will rely on the hub).pipeline_class
overridable to ease override for users of thepipeline
function.pipeline(model="gpt2", pipeline_class=MyPipeline)
should enable you to use whateverpipeline you want.
Related to #14278
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
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.
@LysandreJik