[Feature request] Allow specifying `save_dir` in `snapshot_download`
See original GitHub issueThis will make it easier to load without relying on cache_dir
. IMO it also matches the function name snapshot_download
better. (The current functionality of snapshot_download
feels more like cached_download
.)
snapshot_download('bert-base-uncased', save_dir='local_dir')
AutoModel.from_pretrained('local_dir')
Currently it’s like this: https://github.com/huggingface/huggingface_hub/blob/eed85ca66fd29618870d630a067ec641e0e98085/src/huggingface_hub/snapshot_download.py#L47-L49
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Feature Request - Allow Product and Services Selection when ...
Solved: Hello, I'm currently working on syncing up our CoConstruct page with our QuickBooks transactions. CoConstruct leverages the Product ...
Read more >How to download SNAPSHOT version from maven ...
Just add this to your ~/.m2/settings.xml: <profiles> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> ...
Read more >Level Snapshot - Unreal Engine Documentation
Level Snapshots enable you to save a particular configuration of the Actors in the World Outliner of your Level and instantly restore your...
Read more >LDView Help - GitHub Pages
After this, LDView will automatically download the latest version of the LDraw ... LDraw Dir: Allows you to specify a new location for...
Read more >Flag a Job with a "Warning" when an Orphaned Snapshot is ...
Veeam Community discussions and solutions for: Feature Request: Flag a Job with a "Warning" when an Orphaned Snapshot is detected. of Veeam ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @cccntu,
snapshot_download
already returns the path to where the repo was saved, so you can do thisNo need of building the path yourself 😃 Let us know if this works for you
For context, my use case is first downloading a snapshot, then COPY to docker image at build time. So when the docker images starts, it won’t need to download the model, or even call the api, it can immediately load the local copy.
But I guess I don’t really care about the storage used by cache, copying (instead of moving) the snapshot sounds better. And copying doesn’t feel like something that should be supported. Closing the issue. Thanks for the comments! @LysandreJik @osanseviero