-
Notifications
You must be signed in to change notification settings - Fork 608
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
Some InferenceClient tasks missing parameters
argument, inconsistent with task specifications
#2557
Comments
Yes that is an identified problem. For context, when we first implemented the That been said, if we start adding parameters, we most likely would add a EDIT: another part to take into consideration is that those tasks are much much less used than the text generation or image generation ones, hence the reduced scope. |
Agree, I prefer too adding a |
Sorry sorry, my bad 🙈 I meant we most likely wouldn't add a parameters parameter to the method signatures but individual parameters instead. The problem of a |
Makes sense now that we have a proper documentation 👍 |
Since we are talking about ~10 tasks that follows exactly the same pattern (i.e.
With such a script, we would be sure all those "less used methods" are still well maintained according to the specs. In the past, I've created a few script to auto-generate things (see the It's usually good for such a script to have a "check" mode (fails if something has to be changed) and a "format" mode (modify the file inplace). Once we have it, we can integrate it to the makefile / CI. Let me know what you think :) |
Yes, I was actually thinking about adding
Yes, I like the idea, that will be cool to have this in the makefile/CI.
I will open later a separate issue for this 👍 |
Agree 👍 And if it's too annoying in future maintenance, we can complete the script later.
As you wish, it's also fine to start a PR directly or rename this issue. |
Some task methods in the
huggingface_hub.InferenceClient
do not include aparameters
argument to allow passing additional inference params.The tasks are :
audio-classification
,automatic-speech-recognition
,fill-mask, image-classification
,image-segmentation
,object-detection
,question-answering
,table-question-answering
,text-classification
,token-classification
andtranslation
.This inconsistency makes the implementation not fully aligned with the task specs here and the documentation here.
taking the example of text-classification:
with python requests:
With
InferenceClient
The text was updated successfully, but these errors were encountered: