diff --git a/src/transformers/integrations/integration_utils.py b/src/transformers/integrations/integration_utils.py index db6b634582ee..2f27526c84a6 100755 --- a/src/transformers/integrations/integration_utils.py +++ b/src/transformers/integrations/integration_utils.py @@ -1108,6 +1108,7 @@ def setup(self, args, state, model, **kwargs): name=args.run_name, space_id=os.getenv("TRACKIO_SPACE_ID", None), resume="allow", + private=args.hub_private_repo, ) # Add config parameters (run may have been created manually) diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py index e168c1b98a5c..d960d378f79f 100644 --- a/src/transformers/training_args.py +++ b/src/transformers/training_args.py @@ -680,7 +680,9 @@ class TrainingArguments: The token to use to push the model to the Hub. Will default to the token in the cache folder obtained with `hf auth login`. hub_private_repo (`bool`, *optional*): - 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. + 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. If reporting to Trackio with + deployment to Hugging Face Spaces enabled, the same logic determines whether the Space is private. hub_always_push (`bool`, *optional*, defaults to `False`): Unless this is `True`, the `Trainer` will skip pushing a checkpoint when the previous push is not finished. hub_revision (`str`, *optional*): @@ -1263,7 +1265,10 @@ class TrainingArguments: hub_private_repo: Optional[bool] = field( default=None, metadata={ - "help": "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." + "help": "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. If reporting to " + "Trackio with deployment to Hugging Face Spaces enabled, the same logic determines whether the Space is " + "private." }, ) hub_always_push: bool = field(