Skip to content

Commit c8252f2

Browse files
authored
Let server decide default repo visibility (#7302)
1 parent 06c3235 commit c8252f2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/datasets/arrow_dataset.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5300,7 +5300,7 @@ def push_to_hub(
53005300
data_dir: Optional[str] = None,
53015301
commit_message: Optional[str] = None,
53025302
commit_description: Optional[str] = None,
5303-
private: Optional[bool] = False,
5303+
private: Optional[bool] = None,
53045304
token: Optional[str] = None,
53055305
revision: Optional[str] = None,
53065306
create_pr: Optional[bool] = False,
@@ -5339,9 +5339,9 @@ def push_to_hub(
53395339
Additionally, description of the PR if a PR is created (`create_pr` is True).
53405340
53415341
<Added version="2.16.0"/>
5342-
private (`bool`, *optional*, defaults to `False`):
5343-
Whether the dataset repository should be set to private or not. Only affects repository creation:
5344-
a repository that already exists will not be affected by that parameter.
5342+
private (`bool`, *optional*):
5343+
Whether to make the repo private. If `None` (default), the repo will be public unless the
5344+
organization's default is private. This value is ignored if the repo already exists.
53455345
token (`str`, *optional*):
53465346
An optional authentication token for the Hugging Face Hub. If no token is passed, will default
53475347
to the token saved locally when logging in with `huggingface-cli login`. Will raise an error

src/datasets/dataset_dict.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ def push_to_hub(
15311531
data_dir: Optional[str] = None,
15321532
commit_message: Optional[str] = None,
15331533
commit_description: Optional[str] = None,
1534-
private: Optional[bool] = False,
1534+
private: Optional[bool] = None,
15351535
token: Optional[str] = None,
15361536
revision: Optional[str] = None,
15371537
create_pr: Optional[bool] = False,
@@ -1571,8 +1571,8 @@ def push_to_hub(
15711571
15721572
<Added version="2.16.0"/>
15731573
private (`bool`, *optional*):
1574-
Whether the dataset repository should be set to private or not. Only affects repository creation:
1575-
a repository that already exists will not be affected by that parameter.
1574+
Whether to make the repo private. If `None` (default), the repo will be public unless the
1575+
organization's default is private. This value is ignored if the repo already exists.
15761576
token (`str`, *optional*):
15771577
An optional authentication token for the Hugging Face Hub. If no token is passed, will default
15781578
to the token saved locally when logging in with `huggingface-cli login`. Will raise an error

0 commit comments

Comments
 (0)