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:
adaptersstring
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:Generated Structure
The command generates an adapter template:Interactive Wizard
The wizard will prompt for:- Adapter ID: Lowercase identifier (e.g.,
swebench) - Benchmark Name: Display name (e.g.,
SWE-bench) - Description: One-line description
- Source URL: Repository or paper URL
- License: Dataset license
- Class Name: Python class name for the adapter
- Create the adapter directory structure
- Generate template files with placeholders
- Provide next steps for implementation
Adapter Development
Adapter Class
Implement the adapter inadapter.py:
CLI Entry Point
Therun_adapter.py provides a CLI interface:
Template Files
Use Jinja2 templates in thetemplate/ directory:
instruction.md.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
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
- Handle errors gracefully: Catch exceptions per-task, don’t fail the entire conversion
- Validate inputs: Check that the input dataset has the expected structure
- Provide progress feedback: Print status as tasks are converted
- Support incremental conversion: Skip already-converted tasks
- Document assumptions: Note any limitations or requirements in README
Template Design
- Use sensible defaults: Provide fallback values for optional fields
- Keep templates simple: Complex logic belongs in the adapter, not templates
- Test with real data: Ensure templates render correctly with actual benchmark data
- Document variables: Comment what each template variable represents
Testing
- Test on sample data: Start with a small subset of the benchmark
- Validate output: Run
harbor tasks checkon converted tasks - Run oracle agent: Verify tasks work with
harbor run --agent oracle - Check solutions: If benchmark has solutions, ensure they pass tests
See Also
- harbor tasks - Create and manage tasks
- harbor datasets - List and download datasets
- Benchmark Adapters Guide - Detailed adapter development guide