> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor a Loops run

> List your Loops runs, check a run's status, read a dedicated run's trainer and sampler logs, and see the GPUs your dedicated runs hold.

Check on your runs with the [Baseten CLI](https://docs.baseten.co/reference/cli/baseten/loops.md) or the [Loops API](https://docs.baseten.co/reference/loops-api/overview.md). Logs and GPU usage cover runs in the dedicated mode. For errors from serverless training and sampling calls, see [Loops troubleshooting](https://docs.baseten.co/troubleshooting/loops.md).

The Baseten CLI and the `curl` examples authenticate with `BASETEN_API_KEY`. Export your [API key](https://docs.baseten.co/organization/api-keys.md) first:

```sh theme={"system"}
export BASETEN_API_KEY="YOUR_API_KEY"
```

## List runs

> [tab] Baseten CLI
>
> **To list your runs**:
>
> ```bash theme={"system"}
> baseten loops run list
> ```
>
> The table lists each run's ID, base model, status, and creation time, newest first, and shows only your own active runs:
>
> ```output theme={"system"}
> ID       BASE MODEL             STATUS    CREATED
> def4567  Qwen/Qwen3.6-35B-A3B   ACTIVE    2026-11-06T02:06:01Z
> ```
>
> To include inactive runs, run:
>
> ```bash theme={"system"}
> baseten loops run list --all
> ```
>
> To list every run in your organization, run:
>
> ```bash theme={"system"}
> baseten loops run list --org
> ```
>
> The table then has an `OWNER` column that names each run's owner.

> [tab] REST API
>
> **To list your runs**:
>
> Send a request to [List runs](https://docs.baseten.co/reference/loops-api/runs/list-runs.md):
>
> ```bash theme={"system"}
> curl --url "https://api.baseten.co/v1/loops/runs" \
>   --header "Authorization: Bearer $BASETEN_API_KEY"
> ```
>
> The response's `runs` array lists each run with its `id`, `base_model`, `status`, and `created_at`.

## Check run status

> [tab] Baseten CLI
>
> **To check a run's status**:
>
> Run the following command, replacing `<run_id>` with the run ID from [`TrainingClient.run_id`](https://docs.baseten.co/reference/sdk/loops/training-client) or the run list:
>
> ```bash theme={"system"}
> baseten loops run describe --run-id "<run_id>"
> ```
>
> The command prints one field per line, followed by the run's paired sampler when it has one:
>
> ```output theme={"system"}
> ID:          <run_id>
> Name:        Qwen/Qwen3.6-35B-A3B
> Base Model:  Qwen/Qwen3.6-35B-A3B
> Status:      INACTIVE
> Owner:       <your_email>
> Session:     <session_id>
> Base URL:    https://loops.baseten.co/v1/loops/trainer
> Created:     2026-11-06T02:06:01Z
> ```
>
> To print only the status, run:
>
> ```bash theme={"system"}
> baseten loops run describe --run-id "<run_id>" --jq '.status.name'
> ```
>
> ```output theme={"system"}
> "INACTIVE"
> ```

> [tab] REST API
>
> **To check a run's status**:
>
> Send a request to [Get a run](https://docs.baseten.co/reference/loops-api/runs/get-a-run.md), replacing `<run_id>` with the run ID:
>
> ```bash theme={"system"}
> curl --url "https://api.baseten.co/v1/loops/runs/<run_id>" \
>   --header "Authorization: Bearer $BASETEN_API_KEY"
> ```
>
> The response's `run.status.name` holds the run's status.

## Read run logs

Logs come from a run's deployments, so only dedicated runs have them. A serverless run has no trainer or sampler deployment.

> [tab] Baseten CLI
>
> **To read a run's logs**:
>
> Run the following command, replacing `<run_id>` with the run ID:
>
> ```bash theme={"system"}
> baseten loops run logs --run-id "<run_id>" --tail
> ```
>
> The command streams the trainer's logs until the run stops producing them or you press Ctrl-C. Without `--tail`, it prints up to 5000 lines from the last 30 minutes, newest first. To choose another window, replace `--tail` with `--since`:
>
> ```bash theme={"system"}
> baseten loops run logs --run-id "<run_id>" --since 2h
> ```
>
> To read the paired sampler's logs instead, run:
>
> ```bash theme={"system"}
> baseten loops run logs --run-id "<run_id>" --sampler --tail
> ```
>
> A serverless sampler has no deployment logs, so `--sampler` fails for one.

> [tab] REST API
>
> **To read a run's trainer logs**:
>
> 1. [Get the run](#check-run-status) and copy its `run.deployment_id`.
> 2. Send a request to [Get deployment logs](https://docs.baseten.co/reference/loops-api/deployments/get-deployment-logs.md), replacing `<deployment_id>` with that ID:
>
>    ```bash theme={"system"}
>    curl --url "https://api.baseten.co/v1/loops/deployments/<deployment_id>/logs" \
>      --header "Authorization: Bearer $BASETEN_API_KEY"
>    ```
>
>    To choose a time window, add the `start_epoch_millis` and `end_epoch_millis` query parameters.

## Check GPU usage

[`baseten loops usage`](https://docs.baseten.co/reference/cli/baseten/loops#usage) reports the GPUs that your dedicated trainers and standalone samplers hold. It doesn't report serverless token usage or spend.

**To check GPU usage**:

```bash theme={"system"}
baseten loops usage
```

The command prints a summary of trainer and sampler GPUs in use and scaled to zero:

```output theme={"system"}
Trainer GPUs: 0 in use, 0 scaled to zero. Sampler GPUs: 0 in use, 0 scaled to zero.
```

When allocations hold GPUs, the output also includes a table with each allocation's run, base model, GPU type, trainer status, sampler GPU, sampler status, and creation time. The table leaves out allocations that hold no GPUs, such as scaled-to-zero or stopped ones, and the command prints how many it left out:

```output theme={"system"}
2 allocation(s) holding no live GPUs hidden; pass --all to show them.
```

To include allocations that hold no GPUs, run:

```bash theme={"system"}
baseten loops usage --all
```

To report usage across your organization, run:

```bash theme={"system"}
baseten loops usage --org
```

## Next steps

* [Deactivate a run](https://docs.baseten.co/loops/deactivate-a-run.md): End a run and stop its billing.
* [Check whether an RL run is learning](https://docs.baseten.co/loops/rl-run-health.md): Read reward and rollout metrics during training.
* [Loops troubleshooting](https://docs.baseten.co/troubleshooting/loops.md): Fix request errors and recover failed runs.
