Skip to main content
The harbor sweeps command group provides utilities for running parameter sweeps and iterative refinement experiments.

Commands

harbor sweeps run

Run successive sweeps, dropping tasks with at least one success each sweep.
This command runs multiple evaluation sweeps, progressively focusing on tasks that haven’t succeeded yet. After each sweep, tasks with at least one successful attempt are dropped from the next sweep.

Options

Path
required
Job config file in JSON or YAML format.
int
Max number of sweeps to run. Default: 3
int
Trials per task per sweep. Default: 2
string
Optional generic hint string to pass to agent kwargs.
Path
JSON file mapping task name to hint string. Allows per-task hints.
string
Repo to push DatasetDict with success/failure splits.
string
Repo to push ONLY successes when using --export-separate.
string
Repo to push ONLY failures when using --export-separate.
boolean
Push exported datasets to Hugging Face Hub. Default: --no-push
boolean
Push one repo with splits vs two separate repos. Default: --export-splits

Examples

Run 3 sweeps with 2 trials per task:
Run 5 sweeps with 3 trials per task:
Run with a generic hint:
Run with per-task hints:
Export results to Hugging Face:
Export successes and failures separately:

How It Works

  1. Sweep 1: Run all tasks with N trials each
  2. Filter: Remove tasks with at least one success (reward > 0.0)
  3. Sweep 2: Run remaining tasks with N trials each
  4. Filter: Remove tasks with at least one success
  5. Repeat: Continue until max sweeps reached or all tasks succeed
  6. Export: Optionally export all traces to Hugging Face

Example Workflow

Given 10 tasks and 2 trials per task:

Configuration File

The config file should be a standard JobConfig (same as harbor run):
The sweeps command will override n_attempts with --trials-per-task.

Hints System

Generic Hint

Pass a hint to all agents:
This adds hint to each agent’s kwargs:

Per-Task Hints

Provide specific hints for each task: hints.json:
When using per-task hints, each task runs in a separate job so hints can be customized per task.

Export Options

Export as Splits

Export success and failure traces to one repo with splits:
Results in:

Export Separately

Export to two separate repos:
Results in two datasets:
  • myorg/sweep-successes - only successful traces
  • myorg/sweep-failures - only failed traces

Use Cases

Progressive Difficulty

Focus computational resources on harder tasks:

Iterative Refinement

Provide increasingly specific hints across sweeps:

Data Collection

Collect diverse success and failure examples:

Curriculum Learning

Generate training data with varying difficulty:

Advanced Examples

Multi-Agent Sweeps

Compare multiple agents across sweeps:

Cloud Execution

Run sweeps on cloud infrastructure:

Adaptive Hints

Generate hints based on previous sweep failures:

Job Directory Structure

Sweeps create multiple job directories:
Or when using per-task hints:

See Also