-
Notifications
You must be signed in to change notification settings - Fork 120
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
Custom tasks modeling #669
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Looks great, thanks a lot @IlyasMoutawwakil ! Might be worth adding a test with a customconfig as well, what do you think ?
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
@echarlaix I added an |
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.
Looks great, thanks a lot @IlyasMoutawwakil !
What does this PR do?
This PR adds custom tasks modeling through a new class
OVModelForCustomTasks
which allows using models that are exported with arbitrary inputs/outputs.Fixes #611
how to use
For example to use
google/vit-base-patch16-224
model forimage-classification
while also getting all thehidden_states
:main_export
andmodel_kwargs={"output_hidden_states": True}
which is passed to the model at inference time, andcustom_export_configs
which is a dictionary of custom export configs that tells the exporter how to handle inputs/outputs (e.g. what to name them).OVModeForCustomTasks
:Before submitting