-
Notifications
You must be signed in to change notification settings - Fork 251
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
[Tasks] Mismatch between input specs and task pipelines expected generation #923
Comments
To be clear this is a report regarding the json-schema definitions of tasks in cc @SBrandeis |
cc @Wauplin as well |
Thanks for flagging @hanouticelina This is quite annoying indeed. I personally don't like the idea of having an API parameter called @ArthurZucker @LysandreJik is there a world where |
|
So |
cc @Rocketknight1 who started to work on integrating officially the specs to @hanouticelina let's update the specs to |
Perfect! I will take care of updating the specs now :) |
Big +1 Or |
Agree with @pcuenca that
|
Exactly my thinking, sorry for not explaining. Thanks @LysandreJik! |
Even better! Agree on |
Fixes #923 This PR updates the task specs to rename the `generate` property to `generation_parameters`. This change aligns with the discussion in the issue. Key changes: - Renamed `generate` to `generation_parameters` in the specs for `automatic-speech-recognition`, `image-to-text`, `text-to-audio` and `text-to-speech` tasks.
Description
There's a mismatch between the task input spec and the expected generation parameters in task pipelines for automatic-speech-recognition and image-to-text tasks, and possibly others. Specifically, the input schema defines a parameter named
generate
for generation parameters. However, the_sanitize_parameters()
method implemented in these task pipelines (eg: AutomaticSpeechRecognitionPipeline. _sanitize_parameters()) expects a parameter namedgenerate_kwargs
instead.This mismatch causes errors when calling InferenceAPI according to the specified input specs.
Reproduction
If we follow the input specs defined here for
automatic-speech-recognition
:this returns an output with an error:
When replacing
generate
withgenerate_kwargs
:No error in the output:
We have the same issue for
image-to-text
task.I wanted to open this issue first before proposing any PR to have your opinion first on how to better align the task input specs with the task pipelines.
The text was updated successfully, but these errors were encountered: