You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/transformers/training_args.py
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -693,6 +693,8 @@ class TrainingArguments:
693
693
Whether to make the repo private. If `None` (default), the repo will be public unless the organization's default is private. This value is ignored if the repo already exists.
694
694
hub_always_push (`bool`, *optional*, defaults to `False`):
695
695
Unless this is `True`, the `Trainer` will skip pushing a checkpoint when the previous push is not finished.
696
+
hub_revision (`str`, *optional*):
697
+
The revision to use when pushing to the Hub. Can be a branch name, a tag, or a commit hash.
696
698
gradient_checkpointing (`bool`, *optional*, defaults to `False`):
697
699
If True, use gradient checkpointing to save memory at the expense of slower backward pass.
698
700
gradient_checkpointing_kwargs (`dict`, *optional*, defaults to `None`):
@@ -1361,6 +1363,12 @@ class TrainingArguments:
1361
1363
default=False,
1362
1364
metadata={"help": "Unless `True`, the Trainer will skip pushes if the previous one wasn't finished yet."},
1363
1365
)
1366
+
hub_revision: Optional[str] =field(
1367
+
default=None,
1368
+
metadata={
1369
+
"help": "The revision to use when pushing to the Hub. Can be a branch name, a tag, or a commit hash."
1370
+
},
1371
+
)
1364
1372
gradient_checkpointing: bool=field(
1365
1373
default=False,
1366
1374
metadata={
@@ -2861,6 +2869,7 @@ def set_push_to_hub(
2861
2869
token: Optional[str] =None,
2862
2870
private_repo: Optional[bool] =None,
2863
2871
always_push: bool=False,
2872
+
revision: Optional[str] =None,
2864
2873
):
2865
2874
"""
2866
2875
A method that regroups all arguments linked to synchronizing checkpoints with the Hub.
@@ -2904,6 +2913,8 @@ def set_push_to_hub(
2904
2913
always_push (`bool`, *optional*, defaults to `False`):
2905
2914
Unless this is `True`, the `Trainer` will skip pushing a checkpoint when the previous push is not
2906
2915
finished.
2916
+
revision (`str`, *optional*):
2917
+
The revision to use when pushing to the Hub. Can be a branch name, a tag, or a commit hash.
0 commit comments