-
Notifications
You must be signed in to change notification settings - Fork 613
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
Allow boolean values for force_filename in hf_hub_download #863
Comments
WDYT @julien-c @adrinjalali @LysandreJik? I personally like this idea 👍 |
I don't think it has clear semantics. As a user, looking at the above code, I kinda except it to be saved in the current folder not in the The above result would be something I'd expect from such a call: filepath = hf_hub_download('nateraw/rare-puppers', 'config.json', hash_names=False, overwrite=True) |
I'm closing this issue as #801 is closed and git-aware cache is now the default way to download files from the hub (and keeping correct filename). |
Is your feature request related to a problem? Please describe.
If you want to force the filename of a given download with
hf_hub_download
, right now you have to specify the filename in two places. First, when you name the file you wish to download, and then again as you have to pass a string to theforce_filename
kwarg. It would be really nice if you could just sayforce_filename=True
to use the same name as the one you already referenced.Describe the solution you'd like
When I do:
The filepath should be
'<cache_dir>/config.json'
.If you set it to False, it should behave the same way it does for the default
None
, and use the hashed filename.I can do this if this seems like a reasonable feature to add 😄
The text was updated successfully, but these errors were encountered: