diff --git a/src/datasets/arrow_dataset.py b/src/datasets/arrow_dataset.py
index 589deade653..c6ac25a30b5 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