From c61e951d05becb671b6825cbc655dc20f8af024e Mon Sep 17 00:00:00 2001 From: Wauplin Date: Thu, 28 Nov 2024 17:00:15 +0100 Subject: [PATCH] Let server decide default repo visibility --- src/datasets/arrow_dataset.py | 8 ++++---- src/datasets/dataset_dict.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/datasets/arrow_dataset.py b/src/datasets/arrow_dataset.py index 57f3024e53b..5ae98eaa1b6 100644 --- a/src/datasets/arrow_dataset.py +++ b/src/datasets/arrow_dataset.py @@ -5300,7 +5300,7 @@ def push_to_hub( data_dir: Optional[str] = None, commit_message: Optional[str] = None, commit_description: Optional[str] = None, - private: Optional[bool] = False, + private: Optional[bool] = None, token: Optional[str] = None, revision: Optional[str] = None, create_pr: Optional[bool] = False, @@ -5339,9 +5339,9 @@ def push_to_hub( Additionally, description of the PR if a PR is created (`create_pr` is True). - private (`bool`, *optional*, defaults to `False`): - Whether the dataset repository should be set to private or not. Only affects repository creation: - a repository that already exists will not be affected by that parameter. + private (`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. token (`str`, *optional*): An optional authentication token for the Hugging Face Hub. If no token is passed, will default to the token saved locally when logging in with `huggingface-cli login`. Will raise an error diff --git a/src/datasets/dataset_dict.py b/src/datasets/dataset_dict.py index 40ca0cd7312..e2981fddf82 100644 --- a/src/datasets/dataset_dict.py +++ b/src/datasets/dataset_dict.py @@ -1531,7 +1531,7 @@ def push_to_hub( data_dir: Optional[str] = None, commit_message: Optional[str] = None, commit_description: Optional[str] = None, - private: Optional[bool] = False, + private: Optional[bool] = None, token: Optional[str] = None, revision: Optional[str] = None, create_pr: Optional[bool] = False, @@ -1571,8 +1571,8 @@ def push_to_hub( private (`bool`, *optional*): - Whether the dataset repository should be set to private or not. Only affects repository creation: - a repository that already exists will not be affected by that parameter. + 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. token (`str`, *optional*): An optional authentication token for the Hugging Face Hub. If no token is passed, will default to the token saved locally when logging in with `huggingface-cli login`. Will raise an error