Resolve capacity and quota errors
In the serverless mode, runs share a capacity pool that Baseten manages for you, so a new run starts without reserving GPUs. A capacity429 means the request couldn’t run at that moment. It succeeds once capacity frees up, your limit rises, or the run gets GPUs of its own, and the response tells you which applies:
The SDK retries a capacity refusal for you when it carries a
Retry-After header and a details.reason of loops_capacity. It backs off with jitter, waiting never less than Retry-After and never more than a minute between attempts, for up to ten attempts, before raising LoopsCapacityError. The error’s response holds the original details. Loops never refuses a run or sampler it has already started for capacity, so a capacity 429 comes from creating a run or standalone sampler, or from one that sat idle long enough for another to take its place.
Retry until capacity frees up
Capacity frees up as other runs finish, and the SDK’s retries cover the first few minutes of that. To wait longer, catchLoopsCapacityError and back off on your own schedule:
org_cap refusal won’t help. It clears when a run or sampler ends or your limit rises.
Request more capacity
Baseten can raise the limits on your organization, and a limit change takes longer than the SDK’s retry window. Ask for what a run needs before creating it, and send these details through the Loops request form:- The models and sequence lengths you train.
- How many runs and samplers you need at the same time.
- When you need the capacity, and for how long.
Move the run to the dedicated mode
Setscope to deployment to give the run its own trainer and sampler deployments, billed for GPU time, so it no longer shares that capacity:
429 with Could not schedule trainer means no eligible GPUs are free for the requested shape, and 403 means your organization’s trainer quota is full. See Dedicated Loops.
Run has no deployment ID or deployment logs
A serverless run has anull deployment ID, and its sampler has null model and deployment IDs. This is expected. Check the run’s status with baseten loops run describe.
baseten loops run logs works only for dedicated runs and returns an error for serverless runs and samplers. Retain the run ID, operation, HTTP status, and full SDK error when contacting Baseten support. baseten loops usage reports GPU allocations, not serverless consumption or spend.
Handle SDK request errors
The SDK treats provisioning errors and requests to a running trainer or sampler differently. Use the operation and error message to decide whether to wait or inspect the run:
Gateway rejections, invalid requests, and deactivated models fail without readiness retries. The SDK retries only the capacity refusal described in capacity and quota errors; every other
429, such as the gateway’s usage limit, is raised as soon as it arrives.
Read sampling retry warnings to identify repeated generation attempts. For an interrupted trainer operation, inspect the run’s status before restarting work. On a serverless sampling timeout or cancellation, the SDK attempts to cancel the sample if it’s still queued.
Load a checkpoint trained with a different LoRA configuration
TrainingClient.create_sampling_client(model_path) raises httpx.HTTPStatusError with a 400 response when the checkpoint and the current run use different LoRA configurations:
Output
ServiceClient.create_sampling_client():
Resolve accelerator errors
If provisioning a deployment fails with either of these messages, contact your organization admin or Baseten support:accelerator priority ... has no overlap with your organization's allowlist: The requested GPU type isn’t permitted by your organization’s configuration.has no candidate on those accelerators: The permitted GPUs don’t support the requested model and sequence length.
Stop a run after an interruption
An SDK timeout doesn’t deactivate the run. If you no longer need a dedicated run, deactivate it to stop GPU billing without waiting for automatic shutdown. An idle serverless run incurs no token charges; deactivate it when you want to end the run and its paired sampler. Use the run ID saved by your script. If you only have a session ID, see Find a run from its session ID.Find a run from its session ID
The training client can time out before returning a run ID. If your script saved asession_id, list your runs and find the matching session.
- Baseten CLI
- REST API
To find a run from its session ID:List your runs and filter by the saved session ID. Replace
<session_id> with that value. --all includes inactive runs:id to inspect the run or list its checkpoints.