Skip to content

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