synth-ai train flow is driven by a TOML config that maps to a Pydantic schema under synth_ai/train/configs/. The CLI loads your file, validates it, and turns it into the payload sent to the backend. Use this overview to choose the right schema and find the detailed references.
Schema Cheat Sheet
| Flow | Doc | Schema Class |
|---|---|---|
| Reinforcement Learning | RL Config | synth_ai/train/configs/rl.py (RLConfig) |
| Supervised Fine Tuning | SFT Config | synth_ai/train/configs/sft.py (SFTConfig) |
| Prompt Learning (GEPA/MIPRO) | Prompt Learning Config | synth_ai/train/configs/prompt_learning.py (PromptLearningConfig) |
Shared Guidance
- Match the schema exactly: Field names/types in your TOML must align with the schema attributes; the CLI calls
*.from_path()directly. - Keep secrets in
.env: Task URLs belong in TOML, but API keys should be stored in environment files loaded viauvx synth-ai setupor--env-file. - Validate early: Run
uvx synth-ai train --type <flow> --config <file> --no-pollto surface schema errors without waiting for training to finish. - Document decisions: TOML comments (
# ...) are ignored by the parser—use them to explain dataset locations, model choices, or intended usage. - Version control configs: Commit configs alongside task app changes; reproducibility depends on syncing code + config.