Skip to content
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

Add ability to skip large files #472

Merged
merged 2 commits into from
Nov 25, 2021

Conversation

NielsRogge
Copy link
Contributor

@NielsRogge NielsRogge commented Nov 15, 2021

Fixes #424

Started a draft to add the ability to skip large files when git cloning a repo from the hub (as I need it ASAP).

To do:

  • add corresponding test

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for your PR! Left a few comments.

Please also write tests leveraging the staging endpoint, like it's already done for other Repository tests. In order to test this, please use tiny files that are sill LFS tracked (thanks to their extension, for example). You can check for the size of the file to check if the pointer was downloaded or if the full file was downloaded.

src/huggingface_hub/repository.py Outdated Show resolved Hide resolved
src/huggingface_hub/repository.py Show resolved Hide resolved
src/huggingface_hub/repository.py Outdated Show resolved Hide resolved
@LysandreJik LysandreJik merged commit 0aa5190 into huggingface:main Nov 25, 2021
@LysandreJik
Copy link
Member

Needed this for another PR, will add the tests in the corresponding PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] Add ability to skip large files when creating Repository
3 participants