question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make it possible to skip large files when doing push_to_hub

See original GitHub issue

Is 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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
LysandreJikcommented, Jan 13, 2022

As discussed offline this is very linked to #321, which I believe Zach wants to work on next week.

1reaction
osansevierocommented, Jan 13, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found