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

[tfjs-data] support async generator #8408

Merged

Conversation

tharvik
Copy link
Contributor

@tharvik tharvik commented Oct 4, 2024

tf.data.generator accepts function returning an iterator, or a promise of an iterator, which disallow async generator (which returns not a promise of an iterator but an iterator of promises). it is in fact already supported to pass it an async generator, as iteratorFromFunction works with an iterator function returning promises.

this PR simply adds it as a supported type (and rework the documentation a bit).

related issue #7801

@mattsoulanille
Copy link
Member

/gcbrun

@mattsoulanille mattsoulanille merged commit 636c616 into tensorflow:master Oct 8, 2024
2 checks passed
@tharvik tharvik deleted the tfjs-data_support-async-generator branch October 23, 2024 14:23
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.

2 participants