Coming from profiles? The client no longer exports
Profile,
list_profiles(), get_profile(), or ProfileNotFoundError. profile_names and
profile_ids survive as parameter names on Sandbox, Session, and their list()
methods, but passing a value raises TypeError. Target a runner with runner_ids
instead. Policies replaced profiles as the governance model, and you don’t select
one: see Policies overview.List runners
list_runners() returns every runner your credentials can see:
Runner has a built-in representation that prints the runner ID, the owning
organization, health, CPU and memory in human-readable units, the GPU count, and the
service visibilities the runner can enforce.
Sample output:
Read runner capabilities
Each runner advertises the hardware its Nodes carry. Read these attributes to find a runner that can satisfy the sandbox you want to create:supported_gpu_types holds the exact strings to pass as the type key of a GPU
request. Matching is case-sensitive, so B200 and b200 aren’t the same type. See
Run a GPU sandbox.
max_gpu_count is the runner’s reported aggregate GPU capacity, not a per-sandbox cap. How many
GPUs one sandbox may request is bounded by maxGpuCount in the runner’s policy and
by the free GPUs on a single Node.
Runner attributes
ARunner carries the following attributes:
A
max_* value of 0 can mean the runner doesn’t disclose or report that capacity, not
that it has no resources. Shared runners return 0 because their capacity is withheld,
and CPU and memory values can exclude reserved capacity.
Check live capacity
By default,list_runners() returns capability data only. Pass
include_resources=True to populate Runner.resources with live availability. Use
format_bytes() and format_cpu() to print the values in human-readable units:
resources is None when a runner doesn’t report availability, so guard on it
before you read the values.
RunnerResources attributes
ARunnerResources object carries the following attributes:
Filter the list
Combine filters to narrow the list to runners that can take your workload. The following call returns healthy runners that carry a given GPU type and have at least two GPUs free. Replace[GPU-TYPE] with a value from supported_gpu_types:
runner_group_id, gpu_type, architecture,
healthy_only, and service_visibility. The client applies the three
min_available_* filters after the results arrive. Those three turn on
include_resources for you, and they drop any runner that reports no resource data,
so resources is always populated on what they return.
Parameters
The following parameters are available onlist_runners(). All are keyword-only.
Get a single runner
get_runner() takes a runner ID and the organization that owns it. A runner ID is
unique within its organization rather than globally, so both are required. The call
always returns full details, but resource availability is included only for runners
your organization owns. Replace [RUNNER-ID] and [ORGANIZATION-ID] with the runner
you want and the organization that owns it:
organization_id, so pass
runner.organization_id when you look up a runner you found in an earlier result.
Create a sandbox on a discovered runner
Setplacement_mode="cks" and pass the runner you selected to runner_ids. Replace
[GPU-TYPE] with a value from supported_gpu_types:
runner_ids, CKS placement can use any eligible runner in your organization.
runner_ids is incompatible with serverless placement and with
placement_spillover="serverless_then_cks".
Apply a runner to every sandbox in a session
UseSandboxDefaults to send every sandbox in a session to the same runner:
Error reference
Discovery calls can raise the following exceptions.
When
runner_id or organization_id is empty, get_runner() raises ValueError
before it makes a request.
For the full exception hierarchy, see the
exceptions reference.
For common troubleshooting steps, see the
Sandboxes support articles.