# nodus.cluster

> `nodus.cluster.info()`: the gang env contract of distributed-training.md §3.6, as one object.

Source: https://nodus-platform-site.pages.dev/docs/reference/python/nodus-cluster/
Build revision: 211ad9f836655b1c3a2668c4693e442471f28614

<!-- Generated by scripts/gen-reference.mjs from the SDK docstrings (griffe). Do not edit: run make gen. -->

`nodus.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`

```python
class ClusterInfo(rank: int, size: int, ips: list[str], master_addr: str, master_port: int, epoch: int, transport: str | None, gpus_per_node: int) -> None
```

### `ClusterInfo.epoch`

Type: `int`

### `ClusterInfo.gpus_per_node`

Type: `int`

### `ClusterInfo.ips`

Type: `list[str]`

### `ClusterInfo.is_leader`

Type: `bool`

Rank 0 hosts the rendezvous, and its return value is the clustered call’s result.

### `ClusterInfo.master_addr`

Type: `str`

### `ClusterInfo.master_port`

Type: `int`

### `ClusterInfo.rank`

Type: `int`

### `ClusterInfo.size`

Type: `int`

### `ClusterInfo.transport`

Type: `str | None`

## `info`

```python
info(env: Mapping[str, str] | None = None) -> ClusterInfo
```
