ray.train.collective.broadcast_from_rank_zero#
- ray.train.collective.broadcast_from_rank_zero(data: T) T #
Broadcast small (<1kb) data from the rank 0 worker to all other workers.
Serves as a barrier, meaning that all workers must call this method before the training function can continue.
Example
- Parameters:
data – The small (1kb) data to broadcast from the rank 0 worker to all other workers.
- Returns:
The data broadcasted from the rank 0 worker.
- Raises:
ValueError – If the data is too big.
pickle.PicklingError – If the data is not pickleable.
TypeError – If the data is not pickleable.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.