From f5c8fc16668efe341eb453565eb829c7c88ad16d Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:34:45 +0200 Subject: [PATCH 1/4] Remove token arg from CLI example --- docs/source/cli.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/cli.mdx b/docs/source/cli.mdx index 119a3fe2071..2d3c8a374fa 100644 --- a/docs/source/cli.mdx +++ b/docs/source/cli.mdx @@ -49,5 +49,5 @@ Note that you should pass the `--trust_remote_code` argument only if you trust t For example: ```bash ->>> datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN +>>> datasets-cli convert_to_parquet USERNAME/DATASET_NAME ``` From 8cb6479c15a3ee58141a4d57bc83b149477db483 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:35:18 +0200 Subject: [PATCH 2/4] Add tip suggesting logging in first --- docs/source/cli.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/source/cli.mdx b/docs/source/cli.mdx index 2d3c8a374fa..e09cde5654b 100644 --- a/docs/source/cli.mdx +++ b/docs/source/cli.mdx @@ -51,3 +51,12 @@ For example: ```bash >>> datasets-cli convert_to_parquet USERNAME/DATASET_NAME ``` + + + +Do not forget that you need to log in first to your Hugging Face account: +```bash +huggingface-cli login +``` + + From 9661af9f95d006c9d0ea361e127f309ef56e1550 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:35:45 +0200 Subject: [PATCH 3/4] Update help message for token arg --- docs/source/cli.mdx | 2 +- src/datasets/commands/convert_to_parquet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/cli.mdx b/docs/source/cli.mdx index e09cde5654b..6f3bd45659e 100644 --- a/docs/source/cli.mdx +++ b/docs/source/cli.mdx @@ -34,7 +34,7 @@ positional arguments: optional arguments: -h, --help show this help message and exit - --token TOKEN access token to the Hugging Face Hub + --token TOKEN access token to the Hugging Face Hub (defaults to logged-in user's one) --revision REVISION source revision --trust_remote_code whether to trust the code execution of the load script ``` diff --git a/src/datasets/commands/convert_to_parquet.py b/src/datasets/commands/convert_to_parquet.py index 6f469f1809c..77e1ba3b176 100644 --- a/src/datasets/commands/convert_to_parquet.py +++ b/src/datasets/commands/convert_to_parquet.py @@ -24,7 +24,7 @@ def register_subcommand(parser): parser.add_argument( "dataset_id", help="source dataset ID, e.g. USERNAME/DATASET_NAME or ORGANIZATION/DATASET_NAME" ) - parser.add_argument("--token", help="access token to the Hugging Face Hub") + parser.add_argument("--token", help="access token to the Hugging Face Hub (defaults to logged-in user's one)") parser.add_argument("--revision", help="source revision") parser.add_argument( "--trust_remote_code", action="store_true", help="whether to trust the code execution of the load script" From dd54caad4a59365b808447840dbad6985985ca14 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Fri, 26 Apr 2024 18:45:10 +0200 Subject: [PATCH 4/4] Add leading >>> to bash command --- docs/source/cli.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/cli.mdx b/docs/source/cli.mdx index 6f3bd45659e..21e88f96ec7 100644 --- a/docs/source/cli.mdx +++ b/docs/source/cli.mdx @@ -56,7 +56,7 @@ For example: Do not forget that you need to log in first to your Hugging Face account: ```bash -huggingface-cli login +>>> huggingface-cli login ```