- Dataset.num_blocks() int #
Return the number of blocks of this dataset.
Note that during read and transform operations, the number of blocks may be dynamically adjusted to respect memory limits, increasing the number of blocks at runtime.
>>> import ray >>> ds = ray.data.range(100).repartition(10) >>> ds.num_blocks() 10
Time complexity: O(1)
The number of blocks of this dataset.