Skip to main content
The prime eval run command executes rollouts against any supported model provider and reports aggregate metrics. Use it to test environments during development, benchmark models, and validate training progress.

Quick Start

Basic Usage

The basic command structure:

Essential Options

Examples

Model Configuration

Using Model Aliases

Define model endpoints in configs/endpoints.toml:
configs/endpoints.toml
Then use the alias directly:

Direct Configuration

Override configuration without using aliases:

Sampling Parameters

Control model generation:

Environment Configuration

Passing Arguments to load_environment()

Use --env-args to pass arguments:
my_env.py

Overriding Environment Constructor Args

Use --extra-env-kwargs to pass arguments directly to the constructor:

Evaluation Scope

Examples and Rollouts

Control the evaluation size:
Why multiple rollouts per example?
  • Measure variance in model responses
  • Compute pass@k metrics
  • Enable advantage-based RL training

Concurrency

Control parallel execution:

Saving and Resuming

Saving Results

Enable checkpointing with -s:
Results saved to:

Resuming Evaluations

When resuming:
  • Existing completed rollouts are loaded
  • Only incomplete rollouts are executed
  • Results are appended to the existing checkpoint
  • If all rollouts complete, returns immediately
Configuration compatibility: When resuming, use the same configuration (model, env-args, rollouts-per-example). Mismatches can lead to undefined behavior.

Saving Custom State Columns

Save environment-specific state fields:
Default columns: query, completion, expected_answer, reward, error Access in results.jsonl:

Multi-Environment Evaluation

Evaluate multiple environments with a single command using TOML configs.

Basic Multi-Env Config

configs/eval/my-benchmark.toml
Run all evaluations:

Per-Environment Configuration

configs/eval/detailed.toml

Using Endpoint Registry

configs/eval/multi-model.toml
This runs the same environment with different models for comparison.

Configuration Precedence

When using CLI only:
  1. CLI arguments (highest priority)
  2. Environment defaults from pyproject.toml
  3. Built-in defaults (lowest priority)
When using TOML config:
  1. Per-eval settings in [[eval]] sections (highest priority)
  2. Global settings at top of TOML
  3. Environment defaults from pyproject.toml
  4. Built-in defaults (lowest priority)
When using a TOML config file, all CLI arguments are ignored.

Output and Display

Standard Output

Default display shows progress and summary:

Verbose Mode

Enable detailed logging:
Shows:
  • Model requests and responses
  • Tool calls and results
  • Reward function execution
  • State updates
  • Timing information

TUI Mode

Use alternate screen mode for cleaner display:

Debug Mode

Disable Rich display, use standard logging:
Useful for:
  • CI/CD environments
  • Piping output to files
  • Debugging display issues

Advanced Features

Independent Rollout Scoring

By default, rollouts are scored in groups (all rollouts for the same example together). This enables group-based reward functions and pass@k metrics. Score rollouts independently instead:
Use when:
  • You don’t need group-based metrics
  • You want faster completion (scoring happens as rollouts finish)
  • Your reward functions don’t use plural arguments (completions, prompts, etc.)

Disable Interleaved Scoring

By default, scoring happens as rollouts complete. Disable to score all at once:

Automatic Retries

Enable retries for transient infrastructure errors:
Retries with exponential backoff on:
  • Sandbox timeouts
  • API failures
  • Network errors
  • Other vf.InfraError instances

Heartbeat Monitoring

Send heartbeat pings during evaluation:
Useful for monitoring long-running evaluations.

Push to Hugging Face Hub

Publish results to HF Hub:

Analyzing Results

After saving results with -s, analyze the output files.

Results Structure

Reading Results

Computing Metrics

Common Workflows

Quick Environment Test

Benchmark Evaluation

Model Comparison

Create a config:
configs/eval/compare.toml
Run:

Pre-Training Baseline

Post-Training Validation

Troubleshooting

Slow Evaluation

  • Increase concurrency: -c 64
  • Reduce rollouts per example: -r 1
  • Use faster model for initial testing
  • Check network latency to API

Out of Memory

  • Reduce concurrency: -c 16
  • Use smaller models
  • Enable independent scoring: -i

API Rate Limits

  • Reduce concurrency: -c 8
  • Use endpoint registry with multiple replicas
  • Add retries: --max-retries 3

Inconsistent Results

  • Increase rollouts per example: -r 10
  • Check temperature setting: -T 0.0 for deterministic
  • Ensure environment is deterministic (check random seeds)

Next Steps

  • Training: Use evaluation results to guide RL training → Training Guide
  • Environment improvements: Analyze failed rollouts to improve your environment
  • Model selection: Compare models to choose the best starting point for training