huggingface.js icon indicating copy to clipboard operation
huggingface.js copied to clipboard

Widget should show warning from api-inference

Open mishig25 opened this issue 3 years ago • 7 comments

Widget should show warning from api-inference see this line for example

cc: @adrinjalali

mishig25 avatar Jul 26 '22 13:07 mishig25

also cc @Narsil

This would make it easier for developers of the models to make sure they have the right setup on the repo. On the sklearn side of api-inference-community, we can relay the warnings for users to see potential issues.

adrinjalali avatar Jul 26 '22 13:07 adrinjalali

Mishig the warnings are sent along errors {"error": "Unknown error", "warnings": ["warning1", "warning2"]}.

The warnings are usually not the root cause of the error (which we might show or not depending for if it's a controlled error or not). But very often (in transformers at least) the warnings give a good signal on what went wrong (like sequence is too long) i

Narsil avatar Jul 27 '22 07:07 Narsil

Example of one where would it useful to see warnings:

https://huggingface.co/julien-c/skops-digits

Now that we have skops release, it'd be nice to have this in :)

adrinjalali avatar Aug 12 '22 14:08 adrinjalali

Continuing the discussion at https://github.com/huggingface/api-inference-community/issues/96#issuecomment-1260642472

mishig25 avatar Sep 28 '22 09:09 mishig25

i think this works that way now no? @mishig25

julien-c avatar Nov 22 '23 10:11 julien-c

We show errors but not sure if we display warnings of the API

osanseviero avatar Nov 22 '23 11:11 osanseviero

ah yes, read too fast

julien-c avatar Nov 22 '23 11:11 julien-c