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
Git add with auto_lfs_track should track binary files #687
Comments
i don't remember the |
Yes, we set a 10mb auto track at https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/repository.py#L849-L853 We could do some similar check for binary files for 1MB? |
yes! and sorry about not thinking of this when we changed the thresholds on the hub side (@Pierrci @SBrandeis @coyotte508 ) |
Hey @osanseviero, indeed, happy to do that. Do you have a reproducible code example I can play with? |
Yes @LysandreJik. from huggingface_hub import Repository, HfApi
import os
repo_url = HfApi().create_repo("test-bin-bug")
repo = Repository("local_repo", clone_from=repo_url)
with open(os.path.join("local_repo", "file"), "wb") as out:
out.truncate(1024*1024)
repo.push_to_hub("Commit #1") |
@LysandreJik you can check https://github.com/huggingface/moon-landing/blob/5fa4de96cb48dc0613933d2aa7e3311bbd0abaac/server/scripts/git/pre-receive#L143 for what we use server-side to detect binary files (cc @coyotte508 who implemented it) |
Will be closed by #828 |
When pushing binary files, users get the following error
With auto LFS track this should be tracked by default.
WDYT @LysandreJik @julien-c ?
The text was updated successfully, but these errors were encountered: