Make it possible to skip large files when doing push_to_hub
See original GitHub issueIs your feature request related to a problem? Please describe.
Suppose you have a repo on the hub with some large model files (>1 GB). Suppose that you want to upload some very small tokenizer files to that repo (this was my use case).
Currently when doing
tokenizer.push_to_hub(repo_url="...")
, it will first clone the entire repository (this takes a while!), downloading the big model.pt file, before I’m able to upload my tiny files to the repo.
Describe the solution you’d like
We recently added a kwarg to a Repository called skip_lfs_files
, to skip LFS files when cloning a repo (see #472). It would be great to pass this argument when pushing to the hub, something like:
tokenizer.push_to_hub(repo_url="...", skip_lfs_files=True)
Or skip those files by default?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How can I ignore big files and push to git repo - Stack Overflow
1 Answer 1 · If your file was pushed in your last commit, you can do: git rm --cached path/to/your/big/file git commit --amend...
Read more >Push to hub mixins that do not leverage git #847 - GitHub
Push to hub mixins that do not leverage git #847 ... Make it possible to skip large files when doing push_to_hub #591.
Read more >You just committed a large file and can't push to GitHub
But oops, GitHub complains that you are trying to commit files larger than 50 Mb and even grinds to a halt if they...
Read more >Share a model - Hugging Face
In this tutorial, you will learn two methods for sharing a trained or fine-tuned model on the Model Hub: Programmatically push your files...
Read more >Tutorial: Removing Large Files from Git | by Erin Hoffman
What Not to Do. Often a beginner's first intuition is just to make a new commit that deletes the large file, something like:...
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
As discussed offline this is very linked to #321, which I believe Zach wants to work on next week.
WDYT @muellerzr?
cc @LysandreJik