Local Development Environment
The Condor provides a complete local development stack that includes:- Model Orchestrator (manages participant models)
- PostgreSQL database (stores predictions and scores)
- All three workers (Predict, Score, Report)
- Reports UI (leaderboard and metrics dashboard)
- Example models for testing
Prerequisites
Before starting, ensure you have:Quick Start
1. Clone and Deploy
- Build all Docker images
- Start PostgreSQL
- Start Model Orchestrator
- Start Predict, Score, and Report workers
- Start the Reports UI
- Load example models
2. Access the Reports UI
Once the stack is running: Reports Dashboard: http://localhost:3000 The UI shows:- Leaderboard (model rankings)
- Performance metrics
- Score trends over time
- Per-model detailed views
Development Modes
Full Stack Mode (Default)
Everything runs in Docker:- Testing the complete system
- Verifying end-to-end functionality
- Demonstrating to stakeholders
Dev Mode
Infrastructure runs in Docker, workers run locally:- Debugging worker logic
- Iterating on code quickly
- Attaching debuggers
- Testing code changes without rebuilding images
- Fast iteration (no Docker rebuild)
- Full IDE debugging support
- Easy to test changes
Working with Local Models
Model Directory Structure
Place your test models in thesubmissions directory:
Registering Local Models
Editdeployment/model-orchestrator-local/config/models.dev.yml:
| Field | Description |
|---|---|
id | Unique identifier for the model in the orchestrator |
submission_id | Folder name in submissions/ directory |
crunch_id | Game identifier (use “condor” for Condor) |
desired_state | RUNNING to start, STOPPED to ignore |
cruncher_id | Simulated blockchain ID of the participant |
cruncher_name | Display name for the participant |
model_name | Display name for the model |
Example Test Model
Create a simple test model:Testing Your Model
After adding your model tosubmissions/ and models.dev.yml:
Database Access
Connect to PostgreSQL
Useful Queries
Common Operations
Restart Everything
Stop Everything
Rebuild After Code Changes
Clean Slate (Remove All Data)
View Running Containers
Testing Workflow
Complete Test Cycle
Troubleshooting
Model Not Starting
Check orchestrator logs:requirements.txthas invalid dependencies- Model code has syntax errors
submission_iddoesn’t match folder namedesired_stateisSTOPPED
No Predictions Appearing
Check predict worker logs:- Models timing out (increase timeout in ModelRunnerClient)
- Models returning invalid distributions
- Predict worker not connected to orchestrator
Database Connection Errors
Verify database is running:Scoring Not Happening
Check score worker logs:- Not enough time has passed (check
resolvable_attimestamps) - Score worker crashed (check logs for exceptions)
- Missing market data for realized returns
Development Best Practices
1. Start Simple
Begin with a basic model that just returns uniform distributions:2. Test Incrementally
- ✅ First: Verify model starts and connects
- ✅ Then: Verify tick events are received
- ✅ Then: Verify predictions are generated
- ✅ Then: Verify predictions are stored
- ✅ Finally: Verify scoring works
3. Use Logs Extensively
Add logging to your model:4. Monitor Resource Usage
Next Steps
With a working local environment, you’re ready to:- Develop your game - Customize the prediction task and scoring
- Test with models - Validate your coordinator logic
- Prepare for production - Plan your deployment strategy