Skip to content
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 Dataset.from_generator #4957

Merged
merged 15 commits into from Sep 16, 2022
Merged

Add Dataset.from_generator #4957

merged 15 commits into from Sep 16, 2022

Conversation

mariosasko
Copy link
Contributor

Add Dataset.from_generator to the API to allow creating datasets from data larger than RAM. The implementation relies on a packaged module not exposed in load_dataset to tie this method with datasets' caching mechanism.

Closes #4417

@lhoestq
Copy link
Member

lhoestq commented Sep 13, 2022

I restarted the builder PR job just in case

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 13, 2022

The documentation is not available anymore as the PR was closed or merged.

@mariosasko
Copy link
Contributor Author

CI is now green. huggingface/doc-builder#296 explains why it failed.

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.

Awesome thank you !

Maybe let's open an issue to also add IterableDataset.from_generator ?

docs/source/loading.mdx Outdated Show resolved Hide resolved
src/datasets/arrow_dataset.py Outdated Show resolved Hide resolved
@mariosasko mariosasko merged commit 55f53a2 into main Sep 16, 2022
@mariosasko mariosasko deleted the add-from-generator branch September 16, 2022 14:44
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.

how to convert a dict generator into a huggingface dataset.
3 participants