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

> ## Agent Instructions
> Treat this site as the source of truth for public Osmosis behavior.
> Distinguish the web Platform, the open source Python SDK, and the CLI.
> Use documented commands, configuration fields, and public APIs exactly as written; do not infer internal endpoints or services.

# Osmosis CLI Evaluation

> Submit evaluation runs and inspect results from your workspace directory

Use an evaluation run to test a rollout and grader against a platform dataset before training. Evaluation configs live under `configs/eval/`; push your code before submitting because the platform clones the workspace repository identified by Git `origin` and runs the rollout server-side.

<Note>
  `osmosis eval submit` is also the recommended pre-flight before a training run — run it first to catch problems before committing GPU time.
</Note>

## Quick Start

From inside your workspace directory:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
osmosis dataset list                                # confirm the platform dataset name
git push                                            # make sure the platform sees your commit
osmosis eval submit configs/eval/my-rollout.toml
```

Then inspect or manage the run:

```cli theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
osmosis eval list
osmosis eval info <name>
osmosis eval stop <name>
```

## Evaluation Config

See [Config Files](/cli/config-files#eval-config) for the full field reference.

```toml configs/eval/my-rollout.toml theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
[experiment]
rollout = "my-rollout"                # Rollout directory under rollouts/
entrypoint = "main.py"                # Entrypoint relative to the rollout directory
model_path = "openai/gpt-5-mini"      # LiteLLM-style model name for the evaluation policy
dataset = "my-platform-dataset"       # Platform dataset name from `osmosis dataset list`
# branch = "my-feature"               # Optional: use a pushed branch (default branch if omitted)
# commit_sha = "abc1234"             # Optional: pin to a specific commit

[evaluation]
# Optional. Omit values to use platform defaults.
# limit = 200
# n = 1
# batch_size = 1
# pass_threshold = 1.0
# agent_workflow_timeout_s = 450
# grader_timeout_s = 150

# [env]
# LOG_LEVEL = "INFO"

[secrets]
# Required for eval configs. Use required = [] only when no secrets are needed.
required = ["OPENAI_API_KEY"]
```

<Note>
  When `[evaluation].limit` is omitted, the platform evaluates a random 10% sample of the dataset (at least one row). Set `limit` to evaluate a fixed number of rows — the first `N` rows of the dataset, in order.
</Note>

<Warning>
  Git Sync is the source of truth for your rollout code. The CLI reads config values from the local TOML file you pass, but rollout code comes from the synced workspace repository. Commit and push before submitting code changes. Set `branch` to use a pushed branch or `commit_sha` for a specific pushed revision; omit both to use the default branch.
</Warning>

## How It Works

<Steps>
  <Step title="Resolve workspace and config">
    The CLI reads the evaluation TOML, resolves the workspace from the Git `origin` remote, validates the config paths, and imports the configured rollout entrypoint so its backend can validate itself. That import is best effort: it is skipped with a warning when the local environment cannot satisfy the rollout's declared dependencies, and the platform validates the entrypoint after installing them. It does not scan the module namespace to discover workflow or grader classes. See [Files in a Rollout](/sdk/overview#files-in-a-rollout) for the SDK entrypoint contract and the local-execution warning.
  </Step>

  <Step title="Submit to the platform">
    The CLI submits the evaluation run request. The platform resolves the selected `branch` or `commit_sha` once, clones that commit from the connected workspace repository, and prepares the evaluation environment.
  </Step>

  <Step title="Validate the model">
    Before evaluating any rows, the platform runs a pre-flight check that confirms `[experiment].model_path` is reachable with your configured credentials. If the model is unreachable — wrong name, missing or invalid API key, or provider rate limiting — the run fails early instead of consuming evaluation resources. Provide the model's provider API key by registering it with [`osmosis secret set`](/cli/command-reference#secret) and listing it under `[secrets].required` (see [Configuration Files](/cli/config-files#env-and-secrets)).
  </Step>

  <Step title="Run the rollout server-side">
    The platform starts your rollout and drives `AgentWorkflow.run(ctx)` for each selected dataset row using `[experiment].model_path` as the evaluation policy. The row's `ground_truth` is exposed to `Grader.grade(ctx)` as `ctx.label`, while optional row `metadata` is exposed as `ctx.metadata`; the grader runs when either a label or metadata is present and can use either or both.
  </Step>

  <Step title="Aggregate results">
    The platform aggregates rewards, pass rates, and per-row results. Use `osmosis eval info <name>` (or `osmosis --json eval info <name>`) to inspect them.
  </Step>
</Steps>

## Commands

| Command                                     | Description                                                                             |
| ------------------------------------------- | --------------------------------------------------------------------------------------- |
| `osmosis eval submit <config>.toml [--yes]` | Submit an evaluation run from a TOML under `configs/eval/`.                             |
| `osmosis eval list [--limit N] [--all]`     | List evaluation runs for the current workspace directory.                               |
| `osmosis eval info <run-name>`              | Show details and results for a specific evaluation run.                                 |
| `osmosis eval download <run-name>`          | Download metrics, trajectories, artifacts, and logs for a run.                          |
| `osmosis eval stop <run-name> [--yes]`      | Stop a pending or running evaluation run.                                               |
| `osmosis eval rubric`                       | Local LLM-as-judge over a JSONL conversation file. Does not touch the Osmosis platform. |

See the [Command Reference](/cli/command-reference#eval) for the full flag list.

## From Evaluation Run to Training Run

<Steps>
  <Step title="Submit an evaluation run">
    Run `osmosis eval submit configs/eval/my-rollout.toml`. Use `osmosis eval list` and `osmosis eval info <name>` to track progress and inspect results.
  </Step>

  <Step title="Iterate on rollout code">
    Push fixes to the workspace repository and re-submit. Use `branch` for a feature branch or `commit_sha` to re-run against an older revision when comparing changes.
  </Step>

  <Step title="Submit a training run">
    Once evaluation run results look healthy, run `osmosis train submit configs/training/my-rollout.toml`. See [Training](/cli/training).
  </Step>
</Steps>

## Download Run Outputs

Once a run has data, use `osmosis eval download` to pull metrics, trajectories, artifacts, and logs to your local disk instead of clicking through the web UI.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
# Default: metrics + trajectories for the whole run
osmosis eval download my-eval-run

# Only trajectories and artifacts for selected rows
osmosis eval download my-eval-run --type trajectories,artifacts --rows 3,7,10-20

# Everything, into a custom root
osmosis eval download my-eval-run --type all -o ./eval-outputs/
```

Files land under a fixed layout so re-running the command resumes cleanly:

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
.osmosis/evals/<run-name>/
├── metrics.json
├── summary.jsonl
├── trajectories/row_<row>_run_<n>.json
├── artifacts/row_<row>_run_<n>/...
└── logs.txt
```

The CLI skips local files whose size matches the platform manifest unless you pass `--overwrite`, and downloads over 100 MiB require confirmation unless you pass `--yes`. The CLI retries failed files automatically and lists anything still missing so a second run picks it up. See the [Command Reference](/cli/command-reference#eval-download) for the full flag list.

<Note>
  `osmosis eval info -o` now points at the same run output root, and rich-mode metrics exports save to `.osmosis/evals/<name>/metrics.json`. Existing files under `.osmosis/metrics/` are left untouched.
</Note>

## Local Rubric Scoring

`osmosis eval rubric` is a local utility for scoring an existing JSONL conversation file with an LLM judge. It does not require a workspace directory or platform authentication, and it does not run a rollout. "Local" describes where the command runs: for each record the CLI sends the rubric and the scored assistant message — plus any `original_input`, `ground_truth`, or `metadata` fields on that record — to the provider behind `--model`, so review that provider's privacy and retention terms before scoring sensitive data.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
osmosis eval rubric -d conversations.jsonl \
  --rubric "Evaluate the assistant's helpfulness..." \
  --model openai/gpt-5-mini
```

See the [Command Reference](/cli/command-reference#eval-rubric) for the full flag list.

## Next Steps

<CardGroup cols={2}>
  <Card title="Config Files" icon="file-lines" href="/cli/config-files">
    Full reference for evaluation and training configuration files.
  </Card>

  <Card title="Git Sync" icon="rotate" href="/cli/workspace/git-sync">
    Push and sync rollout code before submitting evaluation runs or training runs.
  </Card>

  <Card title="Training" icon="rocket" href="/cli/training">
    Submit and manage a training run once evaluation results look good.
  </Card>
</CardGroup>
