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
Comment From: fchollet
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.
Comment From: linomi
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.
Comment From: dhantule
@linomi Thanks for reporting this. Could you please close the issue if it's resolved and you don't have anymore questions ?
Comment From: google-ml-butler[bot]
Are you satisfied with the resolution of your issue? Yes No
Comment From: ricky-ma
Will timeseries_dataset_from_array()
be implemented with the torch backend? With the migration to keras 3.0, shouldn't these utilities be framework-agnostic?