ray.data.Dataset.num_blocks#
- Dataset.num_blocks() int [source]#
Return the number of blocks of this
Dataset
.This method is only implemented for
MaterializedDataset
, since the number of blocks may dynamically change during execution. For instance, during read and transform operations, Ray Data may dynamically adjust the number of blocks to respect memory limits, increasing the number of blocks at runtime.- Returns:
The number of blocks of this
Dataset
.