Skip to content

Conversation

@hamid-vakilzadeh
Copy link
Contributor

Hello,

This resolves issues #4988.

I added a method from_generator to class IterableDataset.

I modified the read method of input stream generator to also return Iterable_dataset.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 3, 2022

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

Copy link
Collaborator

@mariosasko mariosasko left a comment

Choose a reason for hiding this comment

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

Great job, thanks!

Besides my comment below, we also need a test (let me know if you need help with that), and then we can merge.

@mariosasko mariosasko linked an issue Oct 3, 2022 that may be closed by this pull request
@mariosasko
Copy link
Collaborator

I added a test and moved the streaming param from read to __init_. Then, I also decided to update the read method of the rest of the packaged modules to account for this param.

@hamid-vakilzadeh Are you OK with these changes?

@mariosasko mariosasko requested a review from lhoestq October 4, 2022 11:54
@hamid-vakilzadeh
Copy link
Contributor Author

@mariosasko these all look great! Thanks for the updates.

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.

Love it ! Thanks :)

@mariosasko mariosasko merged commit 6ad430b into huggingface:main Oct 5, 2022
@hamid-vakilzadeh hamid-vakilzadeh deleted the add_generator_iterable branch October 5, 2022 12:51
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 IterableDataset.from_generator to the API

4 participants