-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs about the CLI #6831
Add docs about the CLI #6831
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Concretely, the docs about convert_to_parquet are here: https://moon-ci-docs.huggingface.co/docs/datasets/pr_6831/en/cli#convert-to-parquet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent, this will be super useful!
There is an issue with the example snippet when copy/pasting it: the leading shell dollar sign is also copied. I guess they will not like to fix it in the backend: currently they only support Python code snippets (with leading What do you suggest, @severo? |
docs/source/cli.mdx
Outdated
|
||
For example: | ||
```shell | ||
$ datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just remove the $
$ datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN | |
datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I added to make clear what the input was (and the output, without leading dollar sign). But I will remove it then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK if I use >>>
, as huggingface-hub docs do? https://huggingface.co/docs/huggingface_hub/en/guides/cli
That way, in the examples above (with input and output), the copy/paste just copies the input. If I remove any leading symbol, the copy/paste will copy input and output...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, it seems like a bug to use >>>
for cli @Wauplin
In our case we have no output, so I would just remove $
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have output in the 2 code snippets above the third one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sure. Hmmm, let's use >>>
then and see the alternative in another PR maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, it seems like a bug to use >>> for cli
Ah sure. Hmmm, let's use >>> then and see the alternative in another PR maybe
Happy to align to whatever convention we want. I haven't really thought the it TBH (and not very opinionated as long as we are consistent)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same for me.
|
||
For example: | ||
```bash | ||
>>> datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN | |
>>> datasets-cli convert_to_parquet USERNAME/DATASET_NAME |
I would not advertise the --token
arg in the example as this shouldn't be the recommended way (best to login with env variable or huggingface-cli login
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comment @Wauplin. I am fixing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by:
Add docs about the CLI.
Close #6830.
CC: @severo