Skip to content

Implementation of iteration over values of a column in an IterableDataset object #7564

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

Merged

Conversation

TopCoder2K
Copy link
Contributor

Refers to this issue.

@TopCoder2K TopCoder2K marked this pull request as draft May 8, 2025 15:01
@TopCoder2K
Copy link
Contributor Author

A couple of questions:

  1. I've noticed two strange things: 1) "Around 80% of the final dataset is made of the en_dataset" in https://huggingface.co/docs/datasets/stream, 2) "Click on "Pull request" to send your to the project maintainers" in https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md Are en_dataset and "your [???]" typos? If so, I can fix them in this PR.
  2. Should I update https://huggingface.co/docs/datasets/stream or https://huggingface.co/docs/datasets/access#iterabledataset to include the new feature?

@lhoestq
Copy link
Member

lhoestq commented May 14, 2025

Great ! and chained indexing was easy indeed, thanks :)

regarding your questions:

I've noticed two strange things: 1) "Around 80% of the final dataset is made of the en_dataset" in https://huggingface.co/docs/datasets/stream, 2) "Click on "Pull request" to send your to the project maintainers" in https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md Are en_dataset and "your [???]" typos? If so, I can fix them in this PR.

Oh good catch, both should be fixed indeed. Feel free to open a new PR for those docs fixes

Should I update https://huggingface.co/docs/datasets/stream or https://huggingface.co/docs/datasets/access#iterabledataset to include the new feature?

Yep good idea, I think in both places, since /stream is supposed to be exhaustive, and /access already mentions accessing a specific column for Dataset

@TopCoder2K
Copy link
Contributor Author

@lhoestq, thank you for the answers!

Yep good idea, I think in both places, since /stream is supposed to be exhaustive, and /access already mentions accessing a specific column for Dataset

👍, I'll try to add something.

By the way, do you have any ideas about why the CI pipelines have failed? Essentially, I've already encountered these problems here.
I think check_code_quality has failed due to the usage of pre-commit. The problem seems to be the old version of the ruff hook. I've tried v0.11.8 (the one that was installed with pip install -e ".[quality]") and pre-commit seems to work like make style now. However, I don't have any ideas about pyav since I don't know what it is...

@TopCoder2K
Copy link
Contributor Author

I've updated /stream and /access, please check the style and clarity. By the way, I would like to add IterableDataset.skip near IterableDataset.take to mimic slicing. What do you think?

@TopCoder2K TopCoder2K marked this pull request as ready for review May 18, 2025 19:59
Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

LGTM :)

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

@lhoestq lhoestq merged commit aa92e27 into huggingface:main May 19, 2025
8 of 14 checks passed
@TopCoder2K TopCoder2K mentioned this pull request May 19, 2025
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.

3 participants