Clusters¶
- class ClusterClient(beaker: Beaker)[source]¶
Methods for interacting with Beaker Clusters. Accessed via the
Beaker.cluster
property.Warning
Do not instantiate this class directly! The
Beaker
client will create one automatically which you can access through the corresponding property.- get(cluster: str, *, include_cluster_occupancy: bool = False) Cluster [source]¶
- Examples:
>>> with Beaker.from_env() as beaker: ... cluster = beaker.cluster.get(cluster_name)
- Returns:
- Raises:
BeakerClusterNotFound – If the cluster doesn’t exist.
- list(*, org: Organization | None = None, sort_order: BeakerSortOrder | None = None, sort_field: Literal['created', 'name', 'running_jobs', 'total_nodes', 'total_gpus', 'free_gpus'] = 'name', include_deleted: bool = False, include_cluster_occupancy: bool = False, limit: int | None = None) Iterable[Cluster] [source]¶
List clusters.
- Returns:
An iterator over
BeakerCluster
protobuf objects.