Skip to main content
Find and stop a Loops run when your script exits before cleanup. Deactivating a run stops its trainer and paired sampler while keeping saved checkpoints.

Stop a run after an interruption

An SDK timeout stops the client from waiting; it doesn’t stop the work on Baseten. If your script or machine stops before cleanup, deactivate the run before retrying. Use the run_id saved by your script. If you only have a session_id, find the run first. Set your API key and run ID:
Use the Baseten CLI to deactivate the run. --yes skips the confirmation prompt:
Then check the run’s status:
Confirm that the run and sampler report INACTIVE. If the run never created a sampler, sampler is null.

Find a run from its session ID

The training client can time out before returning a run ID. If your script saved a session_id, list your runs and find the matching session.
List your runs and filter by the saved session ID. Replace YOUR_SESSION_ID with that value. --all includes inactive runs:
Use the matching run’s id as RUN_ID in the deactivation command. If its status is already INACTIVE, it doesn’t need deactivation.