From c3ee1da5ae9159f4b9b66ce8780cc05ce4259a1a Mon Sep 17 00:00:00 2001 From: Lucain Date: Wed, 27 Nov 2024 12:13:29 +0100 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: CĂ©lina --- src/huggingface_hub/_commit_scheduler.py | 3 +-- src/huggingface_hub/_tensorboard_logger.py | 3 +-- src/huggingface_hub/hf_api.py | 5 ++--- src/huggingface_hub/hub_mixin.py | 2 +- src/huggingface_hub/keras_mixin.py | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/huggingface_hub/_commit_scheduler.py b/src/huggingface_hub/_commit_scheduler.py index 2c1409f003..f1f20339e7 100644 --- a/src/huggingface_hub/_commit_scheduler.py +++ b/src/huggingface_hub/_commit_scheduler.py @@ -50,8 +50,7 @@ class CommitScheduler: revision (`str`, *optional*): The revision of the repo to commit to. Defaults to `main`. private (`bool`, *optional*): - Whether to make the repo private. If `None` (default), will default to been public except if - the organization's default is private. This value is ignored if the repo already exist. + 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*): The token to use to commit to the repo. Defaults to the token saved on the machine. allow_patterns (`List[str]` or `str`, *optional*): diff --git a/src/huggingface_hub/_tensorboard_logger.py b/src/huggingface_hub/_tensorboard_logger.py index d7526f33ca..5e91097246 100644 --- a/src/huggingface_hub/_tensorboard_logger.py +++ b/src/huggingface_hub/_tensorboard_logger.py @@ -75,8 +75,7 @@ class HFSummaryWriter(SummaryWriter): repo_revision (`str`, *optional*): The revision of the repo to which the logs will be pushed. Defaults to "main". repo_private (`bool`, *optional*): - Whether to create a private repo or not. If `None` (default), will default to been public except if - the organization's default is private. This argument 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. path_in_repo (`str`, *optional*): The path to the folder in the repo where the logs will be pushed. Defaults to "tensorboard/". repo_allow_patterns (`List[str]` or `str`, *optional*): diff --git a/src/huggingface_hub/hf_api.py b/src/huggingface_hub/hf_api.py index c685356627..3c1bd6a5d5 100644 --- a/src/huggingface_hub/hf_api.py +++ b/src/huggingface_hub/hf_api.py @@ -3462,8 +3462,7 @@ def create_repo( https://huggingface.co/docs/huggingface_hub/quick-start#authentication). To disable authentication, pass `False`. private (`bool`, *optional*): - Whether the model repo should be private. If `None` (default), will default to been public except if - the organization's default is private. + 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. repo_type (`str`, *optional*): Set to `"dataset"` or `"space"` if uploading to a dataset or space, `None` or `"model"` if uploading to a model. Default is @@ -5049,7 +5048,7 @@ def upload_large_folder( The branch to commit to. If not provided, the `main` branch will be used. private (`bool`, `optional`): Whether the repository should be private. - If `None` (default), will default to been public except if the organization's default is private. + If `None` (default), the repo will be public unless the organization's default is private. allow_patterns (`List[str]` or `str`, *optional*): If provided, only files matching at least one pattern are uploaded. ignore_patterns (`List[str]` or `str`, *optional*): diff --git a/src/huggingface_hub/hub_mixin.py b/src/huggingface_hub/hub_mixin.py index f1277f9fbc..cc352ff799 100644 --- a/src/huggingface_hub/hub_mixin.py +++ b/src/huggingface_hub/hub_mixin.py @@ -645,7 +645,7 @@ def push_to_hub( Message to commit while pushing. private (`bool`, *optional*): Whether the repository created should be private. - If `None` (default), will default to been public except if the organization's default is private. + If `None` (default), the repo will be public unless the organization's default is private. token (`str`, *optional*): The token to use as HTTP bearer authorization for remote files. By default, it will use the token cached when running `huggingface-cli login`. diff --git a/src/huggingface_hub/keras_mixin.py b/src/huggingface_hub/keras_mixin.py index b2a2128e66..e1c7ad503e 100644 --- a/src/huggingface_hub/keras_mixin.py +++ b/src/huggingface_hub/keras_mixin.py @@ -332,7 +332,7 @@ def push_to_hub_keras( Message to commit while pushing. private (`bool`, *optional*): Whether the repository created should be private. - If `None` (default), will default to been public except if the organization's default is private. + If `None` (default), the repo will be public unless the organization's default is private. api_endpoint (`str`, *optional*): The API endpoint to use when pushing the model to the hub. token (`str`, *optional*):