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

Request for multi backend support for timeseries data loading #20603

Open
linomi opened this issue Dec 6, 2024 · 2 comments
Open

Request for multi backend support for timeseries data loading #20603

linomi opened this issue Dec 6, 2024 · 2 comments
Assignees
Labels
type:support User is asking for help / asking an implementation question. Stackoverflow would be better suited.

Comments

@linomi
Copy link

linomi commented Dec 6, 2024

Hi,
I wonder is it possible for you to implement keras.utils.timeseries_dataset_from_array() method by other backends (e.g. JAX)?
it would be nice to not have to add TF dependency just because of this module.
https://github.com/keras-team/keras/blob/v3.7.0/keras/src/utils/timeseries_dataset_utils.py#L7

@fchollet
Copy link
Collaborator

fchollet commented Dec 6, 2024

tf.data.Dataset will work with Keras models using any backend. If using fit(), it works out of the box. If writing your own training loops, it's just a Python iterable.

Also note -- nearly everyone using JAX relies on tf.data for data streaming, at least at Google.

@sachinprasadhs sachinprasadhs added type:support User is asking for help / asking an implementation question. Stackoverflow would be better suited. stat:awaiting response from contributor labels Dec 6, 2024
@linomi
Copy link
Author

linomi commented Dec 9, 2024

Thank you for your response. I'm aware of the nature of tf.data.Dataset as a Python iterable and have used it on many occasions. For some reason, I used my custom data streaming pipeline and JAX as the backend. However, for a specific project, I tried timeseries_dataset_from_array() and noticed that it requires TensorFlow because it's implemented using TF. As I switched from Keras 2.0 to Keras 3.0, I assumed this module was implemented with other backends. I was curious if you have plans to implement this module using JAX, but from your answer, it seems that's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:support User is asking for help / asking an implementation question. Stackoverflow would be better suited.
Projects
None yet
Development

No branches or pull requests

3 participants