Closed mlinke-ai closed 4 months ago
Hi @mlinke-ai , sorry you're facing this issue. Could you check that folder models\\phi-3-mini-4k-instruct-onnx\\.huggingface\\download\\cpu_and_mobile\\cpu-int4-rtn-block-32\\
exists on your disk? If yes, I'm very surprised that the incomplete_path
cannot be opened given that the "ab"
flag when opening it should create it if it is missing. If the folder path does not exist, I would also be surprised but for a different reason (it shouldn't be able to reach this point in code without creating the folder :confused:)
Yes, the folder exists. It also contains all the .metadata
files of the configs and tokenizer.
@mlinke-ai what happens if you run this snippet:
from pathlib import Path
path = Path("models\\phi-3-mini-4k-instruct-onnx\\.huggingface\\download\\cpu_and_mobile\\cpu-int4-rtn-block-32\\phi3-mini-4k-instruct-cpu-int4-rtn-block-32.onnx.1e1faf7ea6930f63caab12412f4a82c329eaddf6cce365e45c3cd00bb0547be8.incomplete")
with path.open("ab") as f:
pass
Do you also get the error?
Yes, the problem still occurs.
I experimented with different paths and different file names and the problem seems to be the path length in characters. Simply for testing purposes, I reduced the length of the hex code section in the file name to 58 characters (originally 64) and it worked. When using 59 characters or more in this section the error comes back.
Interesting, it looks like you are hitting the Windows max file path limit (see docs). I just remembered we've seen this issue before. Here is how to fix it by prepending "\\?\"
to the absolute path. Would you like to open a PR to fix this for the _hf_hub_download_to_local_dir
path?
Thanks, I didn't think about the maximum path length at all.
I will fix the problem and create a PR in the next days.
Have a great day!
Thanks @mlinke-ai! Have a nice day too :)
Closed by https://github.com/huggingface/huggingface_hub/pull/2378 thanks to @mlinke-ai!
Hi, I'm also facing this issue on a cluster. I download "whisper-medium" using huggingface-cli , and when loading the model it's looking for a missing ".incomplete" file. I've also tried downloading using "git clone" on my ubuntu machine (on Desktop to have a shorter path) and then copy it over, but the error occurs regardless... Any help would be really appreciated!
@Leili sorry for the inconvenience. Can you open a new issue describing:
With more information it'll be easier to investigate the issue.
Describe the bug
The
huggingface-cli
fails to download themicrosoft/phi-3-mini-4k-instruct-onnx
model because the.incomplete
file of the.onnx
data file is missing.I assume the file should be created during download to track progress and later resume aborted downloads.
Reproduction
Run the following command:
Logs
System info