ray.data.Dataset.lazy
ray.data.Dataset.lazy#
- Dataset.lazy() ray.data.dataset.Dataset[ray.data.block.T] [source]#
Enable lazy evaluation.
Datasets are 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 dataset 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.fully_executed()
.