[Pipelines] Extend pipelines to handle multiple possible AutoModel classes#11968
[Pipelines] Extend pipelines to handle multiple possible AutoModel classes#11968patrickvonplaten wants to merge 9 commits intohuggingface:masterfrom
Conversation
There was a problem hiding this comment.
I welcome this change
However, I have a feeling we're adding another extra layer of complexity.
Couldn't we use this PR, to simplify the overall logic here. Maybe None could become an empty tuple.
Single class could become 1-tuple.
Overall the rest of the flow should be more streamlined, don't you think ?
Also, IIRC, config.architectures was not added until some point in transformers. Do we have any way to check that we're not breaking legacy models ? (Scanning the hub is my best guess)
|
Re:
Agree that we should be careful here. I'm scanning the hub now to check, but I'm pretty sure that 99% of models have Re:
Agree that we are adding more complexity, but I don't really see how to allow multiple auto classes without adding more complexity. I don't really see how forcing everything to be in the |
What does this PR do?
This PR extends
pipelineto better handle multiple auto model classes per pipeline.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.