Skip to content

Commit

Permalink
✨ add skip_lfs_files to mixins' push_to_hub (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
nateraw committed Apr 29, 2022
1 parent 9a516f5 commit 33c0de3
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit 33c0de3

Please sign in to comment.