Skip to content

Conversation

@albertvillanova
Copy link
Member

Add docs about the CLI.

Close #6830.

CC: @severo

@HuggingFaceDocBuilderDev

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.

@albertvillanova
Copy link
Member Author

Concretely, the docs about convert_to_parquet are here: https://moon-ci-docs.huggingface.co/docs/datasets/pr_6831/en/cli#convert-to-parquet

Copy link
Collaborator

@severo severo left a 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!

@albertvillanova
Copy link
Member Author

albertvillanova commented Apr 25, 2024

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 >>> or ...), as they appear in the IPython interactive console.

What do you suggest, @severo?


For example:
```shell
$ datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN
Copy link
Collaborator

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 $

Suggested change
$ datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN
datasets-cli convert_to_parquet USERNAME/DATASET_NAME --token USER_ACCESS_TOKEN

Copy link
Member Author

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.

Copy link
Member Author

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...

Copy link
Collaborator

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 $

Copy link
Member Author

@albertvillanova albertvillanova Apr 25, 2024

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.

Copy link
Collaborator

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@Wauplin Wauplin Apr 25, 2024

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)

Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>>> 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)

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a doc page for the convert_to_parquet CLI

5 participants