ray.data.Dataset.size_bytes
ray.data.Dataset.size_bytes#
- Dataset.size_bytes() int [source]#
Return the in-memory size of the dataset.
Examples
>>> import ray >>> ds = ray.data.range(10) >>> ds.size_bytes() 80
Note
If this dataset consists of more than a read, then this operation will trigger execution of the lazy transformations performed on this dataset.
Time complexity: O(1)
- Returns
The in-memory size of the dataset in bytes, or None if the in-memory size is not known.