ray.data.Dataset.size_bytes#

Dataset.size_bytes() int[source]#

Return the in-memory size of the dataset.

Note

This operation will trigger execution of the lazy transformations performed on this dataset.

Examples

>>> import ray
>>> ds = ray.data.range(10)
>>> ds.size_bytes()
80
Returns:

The in-memory size of the dataset in bytes, or None if the in-memory size is not known.