Execution Architecture
Harbor uses an orchestrator pattern to manage parallel trial execution:- Environment (container)
- Agent instance
- Verifier
- Logs directory
Orchestrator Types
Local Orchestrator
Runs trials in parallel on your local machine using asyncio:- Development and testing
- Small to medium evaluations (1-50 concurrent trials)
- Controlled resource usage
Choosing Concurrency Level
The optimal concurrency depends on several factors:CPU-Bound Tasks
For tasks that use significant CPU:Memory-Bound Tasks
Calculate based on available memory:I/O-Bound Tasks
For tasks that wait on API calls or network:Cloud Execution
Cloud providers handle resource management:Retry Configuration
Configure automatic retries for transient failures:config.json
Retry Strategies
Aggressive (retry everything):Resource Management
Monitoring Resource Usage
Docker Resource Limits
Set global Docker resource limits:~/.docker/daemon.json
Disk Space Management
Large evaluations can consume significant disk space:Task-Specific Resource Limits
Override default resources per task:Optimizing Throughput
Pipeline Stages
Each trial goes through these stages:- Environment Build (5s - 10min)
- Environment Start (2s - 30s)
- Agent Setup (10s - 2min)
- Agent Execution (1min - 1hr)
- Verification (10s - 5min)
- Cleanup (2s - 10s)
Reduce Build Time
Use pre-built images:task.toml
Reduce Startup Time
Minimize Dockerfile operations:Batch Similar Tasks
Group tasks with similar environments:Rate Limiting
LLM Provider Rate Limits
Stay within API rate limits:Cloud Provider Rate Limits
Progress Monitoring
Real-time Progress
Harbor shows real-time progress by default:Quiet Mode
For scripting or CI/CD:Logging
Check orchestrator logs:Debugging Parallel Execution
Common Issues
Too many concurrent trials:--n-concurrent
Rate limit errors:
Debugging Individual Trials
When trials fail:Performance Benchmarks
Local Execution (16-core, 64GB RAM)
Diminishing returns beyond 16 concurrent trials
Cloud Execution (Daytona)
Approximate values, varies by task complexity
Best Practices
- Start small: Test with 1-2 tasks before full evaluation
- Increase gradually: Double concurrency until you hit limits
- Monitor resources: Watch CPU, memory, and disk usage
- Use appropriate environment: Local for fewer than 50 tasks, cloud for more than 100
- Pre-build images: Use Docker layer caching and snapshots
- Set appropriate timeouts: Avoid wasting resources on stuck trials
- Enable retries: Handle transient failures automatically
- Clean up regularly: Remove old jobs and Docker artifacts
- Batch similar tasks: Group tasks with similar environments
- Test retry config: Ensure retries work as expected
Example Configurations
Small Evaluation (Local)
Medium Evaluation (Local)
Large Evaluation (Cloud)
Next Steps
Running Evaluations
Learn evaluation basics
Cloud Execution
Scale to cloud providers
Creating Tasks
Optimize tasks for parallel execution