create_collective_group#

ray.util.collective.collective.create_collective_group(actors: List[Any], world_size: int, ranks: List[int], backend: Backend = 'NCCL', group_name: str = 'default', gloo_timeout: int = 30000)[source]#

Declare a list of actors as a collective group.

Note: This function should be called in a driver process.

Parameters:
  • actors (List[Any]) – a list of actors to be set in a collective group.

  • world_size (int) – the total number of processes in the group.

  • ranks (List[int]) – the rank of each actor.

  • backend (Backend) – the CCL backend to use, NCCL or GLOO.

  • group_name (str) – the name of the collective group.

  • gloo_timeout (int) – timeout in milliseconds for GLOO operations.