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
Successful use of gradio SSE with private hf space, but inference causes error client side #8266
Comments
Hi @Thomas2419 does the issue you are facing only happen if the Space is private? |
Hello @abidlabs ! Thank you for the response, yes in my testing when making the space Public infer worked just fine. It was only once transition to private and running infer that the error occurs. Otherwise it successfully returns then images and all. |
@Thomas2419 thanks for letting us know! I'll take a look into this. |
@hannahblair In case this assists, I wanted to include a quick update, I was told my usage wasn't quite right and ran some updated tests that should hopefully reflect the intended usage.
And then output of:
Swap space to public output of: Current status: {
type: 'status',
stage: 'pending',
queue: true,
endpoint: '/infer',
fn_index: 1,
time: 2024-05-13T16:16:34.528Z
}
Current status: {
type: 'status',
endpoint: '/infer',
fn_index: 1,
time: 2024-05-13T16:16:34.799Z,
queue: true,
stage: 'pending',
code: undefined,
size: 1,
position: 0,
eta: 48.70225167274475,
success: undefined
}
Current status: {
type: 'status',
endpoint: '/infer',
fn_index: 1,
time: 2024-05-13T16:16:34.800Z,
queue: true,
stage: 'pending',
code: undefined,
size: undefined,
position: 0,
success: undefined,
eta: 48.70225167274475
}
Received data: {
type: 'data',
time: 2024-05-13T16:16:53.801Z,
data: [
{
path: '/tmp/gradio/dcd8a6847a30ba2167f57ac6a0a0a5b4a61a12ec/image.webp',
url: '{Removed for privacy}/file=/tmp/gradio/dcd8a6847a30ba2167f57ac6a0a0a5b4a61a12ec/image.webp',
size: null,
orig_name: 'image.webp',
mime_type: null,
is_stream: false,
meta: [Object]
}
],
endpoint: '/infer',
fn_index: 1
}
Current status: {
type: 'status',
time: 2024-05-13T16:16:53.806Z,
queue: true,
message: undefined,
stage: 'complete',
code: undefined,
progress_data: undefined,
endpoint: '/infer',
fn_index: 1
} |
This has been fixed in the most recent gradio release @gradio/client@0.19.3 for Javascript and the overall gradio 4.31.2 release. Thanks to @pngwn for fixing it up! |
Describe the bug
I have a standard huggingface private space built on the template text to image under gradio. I am able to successfully use the new SSE and open_stream() command very recently introduced. Yet when I go to do inference at my /infer endpoint my script returns the attatched error. The space appears to currently run inference at my request so the issue seems to be the client side error, no errors are thrown in the spaces logs.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
Hugginface space logs after running /infer endpoint:
0%| | 0/2 [00:00<?, ?it/s]
50%|█████ | 1/2 [00:07<00:07, 7.69s/it]
100%|██████████| 2/2 [00:14<00:00, 7.05s/it]
100%|██████████| 2/2 [00:14<00:00, 7.14s/it]
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: