-
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
No error is thrown when model download fails due to insufficient space #2742
Comments
How this impacts sglang: sgl-project/sglang#2801 |
Hi @atbe, sorry you encountered this issue! Another alternative is to manually check for sufficient disk space on your side before calling |
thanks for the reply @hanouticelina !
I do think its a bit odd that the server doesn't exit when serving legitimately fails (in this case due to insufficient space), don't you feel the same? You could check for space manually, but that just feels like a hack compared to getting the server to properly detect that it failed to start and exiting. |
Hi @atbe,
As you can see, the script does properly signals the failure by raising an |
Agree with @hanouticelina here. The check you are referring to here is made before actually downloading the file to warn the user early. We don't want to raise an exception at this stage for the reason explained above. But in any case, an exception will be raised when the disk space will actually be used. |
FWIW, I agree with @atbe . This is not my application code. I shouldn't have to guess if the error is a false positive (or even care if it is). There should be an option to force exit on disk space error -- even if the default remains the same. |
Describe the bug
When downloading a model, the
file_download.py
file does not throw an error when there is not enough space.huggingface_hub/src/huggingface_hub/file_download.py
Line 651 in 2702ec2
This is problematic in environments like sglang, where the server does not exit even though the model weights never finish downloading sgl-project/sglang#2801
Reproduction
Download weights on a device without enough space and observe as there is no indication of the model download failure.
Logs
No response
System info
- any version of `huggingface_hub`
At the very least, I think that there should be a flag of some sorts to throw an exception here, or throw an exception completely.
The text was updated successfully, but these errors were encountered: