Benchmarking Guide¶
Run industry-standard AI coding benchmarks with Victor.
Available Benchmarks¶
| Benchmark | Tasks | Description |
|---|---|---|
| swe-bench | ~2300 | Real-world GitHub issue resolution (Princeton NLP) |
| swe-bench-lite | ~300 | Curated subset of SWE-bench |
| humaneval | 164 | Code generation from docstrings (OpenAI) |
| mbpp | 974 | Mostly Basic Python Problems (Google Research) |
Quick Start¶
# List available benchmarks
victor benchmark list
# Run a small test
victor benchmark run humaneval --max-tasks 5 --profile default
# Run SWE-bench with setup
victor benchmark setup swe-bench --max-tasks 10
victor benchmark run swe-bench --max-tasks 10 --profile deepseek
SWE-bench Setup¶
SWE-bench evaluates agents on real GitHub issues. Each task requires cloning and indexing repositories.
Two-Phase Approach¶
-
Setup phase (optional but recommended):
- Clones repos to~/.victor/swe_bench_cache/
- Builds code indexes for semantic search
- Can be run once and reused -
Execution phase:
- Uses cached repos if available
- Falls back to on-the-fly setup if not
Profile Configuration¶
Create a benchmark-optimized profile in ~/.victor/config.yaml:
profiles:
benchmark:
provider: anthropic
model: claude-sonnet-4-20250514
timeout: 600 # 10 minutes per task
max_turns: 15
deepseek-bench:
provider: deepseek
model: deepseek-coder
timeout: 300
Running Benchmarks¶
Basic Usage¶
# Run with default profile
victor benchmark run swe-bench --max-tasks 10
# Run with specific profile and model
victor benchmark run humaneval --profile benchmark --model claude-3-opus
# Run with parallel execution
victor benchmark run mbpp --parallel 4 --max-tasks 100
# Save results to file
victor benchmark run humaneval --output results.json
Resuming Interrupted Runs¶
If a benchmark run is interrupted (Ctrl+C, timeout, crash), use --resume:
# Resume from checkpoint
victor benchmark run swe-bench --max-tasks 50 --resume
# Checkpoints are stored in ~/.victor/checkpoints/
Command Options¶
| Option | Description |
|---|---|
--max-tasks, -n |
Maximum number of tasks to run |
--model, -m |
Model to use (overrides profile) |
--profile, -p |
Victor profile to use |
--timeout, -t |
Timeout per task in seconds (default: 300) |
--max-turns |
Maximum conversation turns per task (default: 10) |
--parallel |
Number of parallel tasks (default: 1) |
--resume, -r |
Resume from checkpoint if interrupted |
--output, -o |
Output file for results (JSON) |
--log-level |
Logging level (DEBUG, INFO, WARNING, ERROR) |
Interpreting Results¶
Metrics¶
| Metric | Description |
|---|---|
| Pass Rate | Percentage of tasks that passed all tests |
| Total Tasks | Number of tasks evaluated |
| Passed | Tasks with all tests passing |
| Failed | Tasks with test failures |
| Errors | Tasks that errored during execution |
| Timeouts | Tasks that exceeded timeout |
| Total Tokens | Total input + output tokens used |
| Duration | Total wall-clock time |
Result Files¶
Results are automatically saved to ~/.victor/evaluations/:
{
"benchmark": "swe-bench",
"model": "claude-sonnet-4-20250514",
"timestamp": "2025-01-03T12:00:00",
"metrics": {
"total_tasks": 50,
"passed": 12,
"failed": 35,
"errors": 2,
"timeouts": 1,
"pass_rate": 0.24,
"duration_seconds": 3600,
"total_tokens": 500000
}
}
Framework Comparison¶
Compare Victor against other AI coding frameworks:
# Show published results
victor benchmark compare --benchmark swe-bench
# Show capability comparison
victor benchmark capabilities
# Show leaderboard
victor benchmark leaderboard --benchmark swe-bench
Common Issues¶
Slow SWE-bench Setup¶
Problem: Initial setup takes too long.
Solution: Run setup separately before benchmarking:
Rate Limiting¶
Problem: API rate limits cause failures.
Solution: Use --parallel 1 and increase timeout:
Memory Issues¶
Problem: Large codebases cause memory pressure.
Solution: Limit parallel tasks:
Checkpoint Recovery¶
Problem: Need to restart an interrupted run.
Solution: Use --resume flag:
Checkpoints are stored in ~/.victor/checkpoints/ and are automatically cleared on successful completion.
Best Practices¶
- Start small: Run with
--max-tasks 5first to verify setup - Use setup phase: Pre-clone repos for faster execution
- Monitor costs: SWE-bench tasks can consume many tokens
- Save results: Use
--outputto preserve detailed results - Resume on failure: Use
--resumeto continue interrupted runs
Performance Tips¶
- Use local models (Ollama, LMStudio) to avoid API costs during testing
- Pre-cache repositories with
victor benchmark setup - Adjust
--timeoutbased on model speed - Limit
--max-turnsto control token usage