Skip to content

Commit 33c0de3

Browse files
authored
✨ add skip_lfs_files to mixins' push_to_hub (#858)
1 parent 9a516f5 commit 33c0de3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/huggingface_hub/hub_mixin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def push_to_hub(
220220
git_user: Optional[str] = None,
221221
git_email: Optional[str] = None,
222222
config: Optional[dict] = None,
223+
skip_lfs_files: bool = False,
223224
) -> str:
224225
"""
225226
Upload model checkpoint or tokenizer files to the Hub while
@@ -261,6 +262,8 @@ def push_to_hub(
261262
pushing files to the hub.
262263
config (`dict`, *optional*):
263264
Configuration object to be saved alongside the model weights.
265+
skip_lfs_files (`bool`, *optional*, defaults to `False`):
266+
Whether to skip git-LFS files or not.
264267
265268
266269
Returns:
@@ -308,6 +311,7 @@ def push_to_hub(
308311
use_auth_token=use_auth_token,
309312
git_user=git_user,
310313
git_email=git_email,
314+
skip_lfs_files=skip_lfs_files,
311315
)
312316
repo.git_pull(rebase=True)
313317

0 commit comments

Comments
 (0)