Closed pseudotensor closed 3 months ago
Hi @pseudotensor !
I think fixing this makes sense, what about adding the new except branch here: https://github.com/huggingface/transformers/blob/c876d12127272ce2886ce51399928c3343d475b9/src/transformers/utils/hub.py#L649 instead of patching it on modeling_utils
so that we fix that for all methods / code paths that use has_file
. What do you think?
Probably fine, you would definitely know best.
Perfect, would you like to contribute for that ? Otherwise happy to do it !
Please do.
System Info
4.41.0 or others python 3.10 Ubuntu 22
Who can help?
@ArthurZucker and @younesbelkada
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Online do:
Then offline do:
You'll see it fail with connection error despite setting offline envs:
For now, I patched the problem like this: https://github.com/h2oai/h2ogpt/blob/main/docs/trans.patch
With the patch all goes fine.
Thanks!
Expected behavior
If setting offline envs and are offline, it shouldn't fail if have all files just because of the safe tensors checks in the code.
I imagine there may be many other offline issues like this that need fixing in some general way.