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 skip_lfs_files to mixins' push_to_hub #858

Merged
merged 1 commit into from Apr 29, 2022
Merged

Add skip_lfs_files to mixins' push_to_hub #858

merged 1 commit into from Apr 29, 2022

Conversation

nateraw
Copy link
Contributor

@nateraw nateraw commented Apr 29, 2022

I know #847 is going to change a lot with the mixins, but this is a really helpful simple change that we leveraged in the HugGAN sprint that I figured we could add for now. Its nice to be able to skip LFS files when you're using a temp dir as your save dir (which you might be doing in a for loop, such as a training loop).

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 29, 2022

The documentation is not available anymore as the PR was closed or merged.

@osanseviero
Copy link
Member

Just to see if I understand correctly, this will make the pulling within the push_to_hub avoid pulling the large files, but it would still push the lfs files. Is that correct?

@osanseviero
Copy link
Member

A bit unrelated to this PR, but it would be nice to change

repo.git_add()
repo.git_commit(commit_message)
repo.git_push()

to

repo.push_to_hub()

Copy link
Contributor

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

LGTM as a temporary change. But we may change it before the next release anyway.

@adrinjalali
Copy link
Contributor

@osanseviero I kinda do appreciate the methods being explicit about whether they do git or they work with the REST endpoints.

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.

LGTM, nice improvement already.

@nateraw nateraw merged commit 33c0de3 into main Apr 29, 2022
@nateraw nateraw deleted the track-lfs-mixin branch April 29, 2022 16:17
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.

None yet

5 participants