Keras version: 3.13.2
Currently, keras.utils.timeseries_dataset_from_array strictly returns a tf.data.Dataset.
I propose adding a format parameter to this utility function to specify the return type, similar to how other Keras data loading utilities (like image_dataset_from_directory) handle data formats.
Specifically, I would like to be able to output a Grain dataset. This would remove another TensorFlow dependency as well.
Example usage:
# Current default behavior
dataset = keras.utils.timeseries_dataset_from_array(..., format="tf.data")
# Proposed behavior
dataset = keras.utils.timeseries_dataset_from_array(..., format="grain")