Skip to main content
The harbor adapters command group provides utilities for creating adapters that convert external benchmark formats to Harbor task format.

Commands

harbor adapters init

Launch the interactive wizard to initialize a new adapter template.

Arguments

string
Adapter ID (lowercase, no spaces). Leave empty to derive from --name.

Options

Path
Directory in which to create the adapter folder. Default: adapters
string
Vanilla benchmark name (e.g., SWE-bench, MLEBench).
string
Override adapter class name. Defaults from --name.
string
One-line adapter description for README.
string
Source repository or paper URL.
string
Dataset/benchmark license (for README).

Examples

Launch interactive wizard:
Create adapter with pre-filled information:
Create in custom directory:
Specify custom class name:

Generated Structure

The command generates an adapter template:

Interactive Wizard

The wizard will prompt for:
  1. Adapter ID: Lowercase identifier (e.g., swebench)
  2. Benchmark Name: Display name (e.g., SWE-bench)
  3. Description: One-line description
  4. Source URL: Repository or paper URL
  5. License: Dataset license
  6. Class Name: Python class name for the adapter
It will then:
  • Create the adapter directory structure
  • Generate template files with placeholders
  • Provide next steps for implementation

Adapter Development

Adapter Class

Implement the adapter in adapter.py:

CLI Entry Point

The run_adapter.py provides a CLI interface:

Template Files

Use Jinja2 templates in the template/ directory: instruction.md.j2:
task.toml.j2:
Dockerfile.j2:

Existing Adapters

Harbor includes adapters for 20+ benchmarks:

Software Engineering

  • swebench - SWE-Bench
  • swebenchpro - SWE-Bench Pro
  • swesmith - SWESmith
  • swtbench - SWT-Bench
  • aider_polyglot - Aider Polyglot

Code Generation

  • autocodebench - AutoCodeBench
  • compilebench - CompileBench
  • livecodebench - LiveCodeBench
  • humanevalfix - HumanEvalFix
  • evoeval - EvoEval
  • deveval - DevEval
  • codepde - CodePDE

Research & ML

  • mlgym-bench - ML-Gym Bench
  • replicationbench - ReplicationBench

Reasoning & QA

  • aime - AIME
  • gpqa-diamond - GPQA Diamond
  • usaco - USACO

Multimodal

  • mmau - MMAU

Other

  • sldbench - SLDBench
You can find these in the adapters/ directory of the Harbor repository.

Running Adapters

After creating an adapter, run it to convert datasets:

Examples

Create a New Adapter

Adapt an Existing Benchmark

Customize Template Files

Best Practices

Adapter Implementation

  1. Handle errors gracefully: Catch exceptions per-task, don’t fail the entire conversion
  2. Validate inputs: Check that the input dataset has the expected structure
  3. Provide progress feedback: Print status as tasks are converted
  4. Support incremental conversion: Skip already-converted tasks
  5. Document assumptions: Note any limitations or requirements in README

Template Design

  1. Use sensible defaults: Provide fallback values for optional fields
  2. Keep templates simple: Complex logic belongs in the adapter, not templates
  3. Test with real data: Ensure templates render correctly with actual benchmark data
  4. Document variables: Comment what each template variable represents

Testing

  1. Test on sample data: Start with a small subset of the benchmark
  2. Validate output: Run harbor tasks check on converted tasks
  3. Run oracle agent: Verify tasks work with harbor run --agent oracle
  4. Check solutions: If benchmark has solutions, ensure they pass tests

See Also