Skip to content

Feature Request: Add format parameter to timeseries_dataset_from_array #22227

@alenowak

Description

@alenowak

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")

Metadata

Metadata

Labels

type:featureThe user is asking for a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions