ray.data.Dataset.lazy#

Dataset.lazy() ray.data.dataset.Dataset[source]#

Enable lazy evaluation.

Dataset is lazy by default, so this is only useful for datasets created from ray.data.from_items(), which is eager.

The returned dataset is a lazy dataset, where all subsequent operations on the stream won’t be executed until the dataset is consumed (e.g. .take(), .iter_batches(), .to_torch(), .to_tf(), etc.) or execution is manually triggered via .materialize().

Warning

DEPRECATED: This API is deprecated and may be removed in future Ray releases. Dataset is lazy by default, so this conversion call is no longer needed and this API will be removed in a future release