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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/huggingface_hub/hub_mixin.py
Expand Up @@ -220,6 +220,7 @@ def push_to_hub(
git_user: Optional[str] = None,
git_email: Optional[str] = None,
config: Optional[dict] = None,
skip_lfs_files: bool = False,
) -> str:
"""
Upload model checkpoint or tokenizer files to the Hub while
Expand Down Expand Up @@ -261,6 +262,8 @@ def push_to_hub(
pushing files to the hub.
config (`dict`, *optional*):
Configuration object to be saved alongside the model weights.
skip_lfs_files (`bool`, *optional*, defaults to `False`):
Whether to skip git-LFS files or not.


Returns:
Expand Down Expand Up @@ -308,6 +311,7 @@ def push_to_hub(
use_auth_token=use_auth_token,
git_user=git_user,
git_email=git_email,
skip_lfs_files=skip_lfs_files,
)
repo.git_pull(rebase=True)

Expand Down