deisa.ray.comm module¶
- class deisa.ray.comm.MPICommAdapter(comm)[source]¶
Bases:
objectAdapter exposing an MPI communicator via the shared Comm protocol.
- class deisa.ray.comm.NoOpComm(rank: int = 0, world_size: int = 1)[source]¶
Bases:
objectFallback communicator that no-ops synchronization calls.
- class deisa.ray.comm.TorchDistComm(*, rank: int, world_size: int)[source]¶
Bases:
objectTorch distributed communicator implementing the Comm protocol.
- deisa.ray.comm.init_gloo_comm(world_size: int, rank: int, master_addr: str = '127.0.0.1', master_port: int = 29500, timeout_s: int = 120) TorchDistComm[source]¶
Set up a Gloo communicator backed by a TCP store.
- Parameters:
world_size (int) – Number of ranks participating in the communicator.
rank (int) – Rank ID of the current process.
master_addr (str, optional) – Hostname or IP address of the master rendezvous node. Defaults to
"127.0.0.1".master_port (int, optional) – Port of the master rendezvous node. Defaults to 29500.
timeout_s (int, optional) – Timeout (seconds) for rendezvous setup. Defaults to 120.
- Returns:
Wrapper around the initialized PyTorch process group.
- Return type: