Skip to main content

ChamberClient

The main class for interacting with the Chamber API.

Initialization

Default API URL: https://api.usechamber.io/v1

Auto-Containerize & Run

run()

Auto-containerize and submit a GPU workload in one call. See the full guide for detailed documentation.
Requires installation with pip install chamber-sdk[run]
Key Parameters: Returns: Workload object (or DryRunResult if dry_run=True) See Auto-Containerize & Run for the complete parameter reference.

Registry Management

Static methods for managing container registries. Configuration is persisted to ~/.chamber/config.json.

list_registries()

List all configured registries.
Returns: dict[str, str] mapping names to URLs

add_registry()

Add or update a named registry.
Parameters:

set_default_registry()

Set the default registry by name.
Raises: ValueError if the registry name doesn’t exist

get_default_registry()

Get the current default registry.
Returns: tuple[str, str] of (name, url) or None if not configured

Workload Submission

submit_job()

Submit a new GPU workload.
Parameters: Returns: Workload object

Distributed Training

For multi-node distributed training:
Additional Parameters:

Workload Management

get_workload()

Retrieve details of a specific workload.
Returns: Workload object

list_workloads()

List workloads with optional filters.
Parameters: Returns: PaginatedResponse with items, next_token, total_count

iter_workloads()

Iterate through all workloads with automatic pagination.

cancel_workload()

Cancel a running or pending workload.
Returns: Workload object with updated status

search_workloads()

Search workloads with advanced filtering.
Parameters: Returns: WorkloadSearchResult with items, total_count, has_more, next_cursor

get_workload_aggregations()

Get workload counts grouped by a dimension.
Parameters: Returns: AggregationResult with dimension, buckets, total

wait_for_completion()

Block until a workload reaches a terminal status.
Returns: Workload object with final status

Metrics and Statistics

get_workload_metrics()

Retrieve GPU metrics for a specific workload.
Parameters: Returns: WorkloadMetrics with gpu_utilization, memory_utilization, temperature, power_usage

get_global_metrics()

Get aggregated metrics for your organization.
Parameters: Returns: GlobalMetrics with aggregated data

get_batch_workload_metrics()

Get metrics for multiple workloads at once.
Returns: Dict with workload metrics ranked by the specified metric

get_workload_stats()

Get aggregated workload statistics.
Returns: WorkloadStats with total, by_status, by_job_class

Teams

list_teams()

List all teams accessible to the current user.
Returns: List of Team objects

create_team()

Create a new team.
Parameters: Returns: Team object

get_team()

Get details of a specific team.
Returns: Team object

Templates

list_templates()

List available workload templates.
Parameters: Returns: List of Template objects

get_template()

Get details of a specific template.
Returns: Template object

Allocations

list_allocations()

List capacity allocations for a team.
Returns: List of Allocation objects

create_allocation()

Create a new capacity allocation.
Returns: Allocation object

get_allocation()

Get details of a specific allocation.
Returns: Allocation object

Capacity

get_capacity()

Check available GPU capacity and budget.

health()

Check API health status.

Enums

JobStatus

JobClass

ScalingMode

AllocationStatus


Data Models

Workload

Team

Template

Allocation


Exceptions

All exceptions inherit from ChamberError:

Handling run() Errors