ray.experimental.collective.create_collective_group#
- ray.experimental.collective.create_collective_group(actors: List[ActorHandle], backend: str, name: str | None = None) CommunicatorHandle [source]#
Create a collective group on the given list of actors. If this function returns successfully, then the collective group has been initialized on all actors, using the given order of actors as the ranks.
Currently, an actor can only participate in one collective group per backend at a time. To reuse an actor, destroy its collective group and create a new one.
- Parameters:
actors – The actors to participate in the collective group.
backend – The backend to use. See ray.util.collective.types.Backend for valid backends.
name – A name to use for the collective group. If None is provided, a random name will be generated.
- Returns:
Handle to the communicator.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.