🤗 Instances • 🤗 Trajectories • 🤗 Terminal-Lego-Qwen3-8B/32B • 🧑💻 Code • 📖 Paper
pip install -r requirements.txtcp .env.example .env
# Edit .env with your API keysRequired environment variables:
OPENAI_API_KEY— API key for an OpenAI-compatible LLM serviceOPENAI_API_BASE— API base URL (default:https://api.openai.com/v1)SO_API_KEY— StackOverflow API key (get one here)MODEL_NAME— Model to use (default:claude-opus-4-6)
bash run_pipeline.shThis runs in a loop: scrape → generate → validate → next round.
python scraper/so_scraper.py \
--round 1 \
--output ./data \
--count 5000 \
--api-key "$SO_API_KEY"python generator/task_generator.py \
--input ./data/so_data_r1.json \
--output ./data/candidates_r1 \
--workers 16 \
--model claude-opus-4-6python validator/validate_tasks.py \
--input ./data/candidates_r1 \
--output ./data/validated_r1 \
--workers 8 \
--timeout 300Each generated task has this structure:
task_00001/
├── instruction.md # Task description
├── task.toml # Metadata (difficulty, category, tags)
├── environment/
│ ├── Dockerfile # Container setup
│ └── task_file/ # Input files
├── solution/
│ └── solve.sh # Reference solution
└── tests/
├── test.sh # Test runner
└── test_outputs.py # pytest assertions
| Variable | Default | Description |
|---|---|---|
CRAWL_COUNT |
5000 | Questions to crawl per round |
GEN_WORKERS |
16 | Parallel threads for generation |
VAL_WORKERS |
8 | Parallel threads for validation |
VAL_TIMEOUT |
300 | Docker timeout per step (seconds) |
MODEL_NAME |
claude-opus-4-6 | LLM model name |
- Python 3.10+
- Docker (for validation step)
- An OpenAI-compatible API endpoint
- StackOverflow API key (optional, increases rate limits)
MIT
