nodus.cluster
View Markdownnodus.cluster.info(): the gang env contract of distributed-training.md §3.6, as one object.
It works in @nodus.clustered Functions and in plain gang Jobs alike; outside a gang it describes a gang of one.
ClusterInfo
Section titled “ClusterInfo”class ClusterInfo(rank: int, size: int, ips: list[str], master_addr: str, master_port: int, epoch: int, transport: str | None, gpus_per_node: int) -> NoneClusterInfo.epoch
Section titled “ClusterInfo.epoch”Type: int
ClusterInfo.gpus_per_node
Section titled “ClusterInfo.gpus_per_node”Type: int
ClusterInfo.ips
Section titled “ClusterInfo.ips”Type: list[str]
ClusterInfo.is_leader
Section titled “ClusterInfo.is_leader”Type: bool
Rank 0 hosts the rendezvous, and its return value is the clustered call’s result.
ClusterInfo.master_addr
Section titled “ClusterInfo.master_addr”Type: str
ClusterInfo.master_port
Section titled “ClusterInfo.master_port”Type: int
ClusterInfo.rank
Section titled “ClusterInfo.rank”Type: int
ClusterInfo.size
Section titled “ClusterInfo.size”Type: int
ClusterInfo.transport
Section titled “ClusterInfo.transport”Type: str | None
info(env: Mapping[str, str] | None = None) -> ClusterInfo