External runs¶
This page is for people who train with their own framework (for example TRL or NeMo RL) and want gatedtrain to gate the result. gatedtrain does not start the training: you run your trainer and your evaluator, and gatedtrain reads what they wrote. The page shows the flow, then the adapter plugins that read each trainer's outputs and the recipe repositories that ship ready-made adapters.
How an external run flows¶
The picture shows the flow: ext-launch checks your run request and prints the command; you run your trainer and
your evaluator; the evaluation results of the base and the candidate become one arm directory each (per clause);
ext-collect reads the run's outputs through the adapter, compares the two arms and writes the consumption ledger,
the checkpoint lineage and the gate report.
flowchart TB
trainer["Your trainer (you run it; ext-launch checks the request first)"]
trainer --> out["Run outputs: checkpoints, consumption logs"]
out --> evaluator["Your evaluator: scores the base and the candidate"]
evaluator --> arms["Arm files: per-item results, one directory per model (per clause)"]
arms --> collect["ext-collect"]
out -->|"read through the adapter"| collect
collect --> ledger["Consumption ledger and lineage"]
collect --> gate{"Gate"}
gate --> report["Gate report"]
ext-launchchecks the run request, writes the launch record and prints the command; you run it.- Your evaluator scores the base and the candidate on the registered items. Its results become one arm directory per
model (per clause) holding
items.jsonlandeval_meta.json;ext-from-nel,ext-merge-evalandext-arm-fillbuild and verify these. ext-collectcompares the two arms item by item and writes the run directory: gate report, consumption ledger and checkpoint lineage.impactthen works on it.
Every command and its flags: Commands and section 7 of the
CPU quickstart. How ext-collect checks the
evaluation items against the training data (exact text matches): Concepts.
Adapter plugins¶
An adapter is how gatedtrain understands one trainer's outputs. Each external training recipe has an adapter: a
pure-Python class that reads the run's outputs (checkpoints, consumption logs, evaluation records) without importing
the training framework, plus registry rows that describe the run (inputs, container paths, pins, evaluators). A
recipe package registers them through the Python entry point group gatedtrain.adapters:
[project.entry-points."gatedtrain.adapters"]
my_adapter = "my_recipe.my_adapter_rows:PLUGIN"
where PLUGIN = {"adapters": {name: "module:Class"}, "trainer_rows": {name: row}, "evaluator_rows": {id: row}}
(gatedtrain.ext.registry). Adapters use the helpers of gatedtrain.ext.sdk and gatedtrain.ext.rowkit.
Conformance kit¶
A recipe repository can run the conformance checks with its own tests, so that a plugin that
registers but would break ext-launch, ext-arm-fill or ext-collect fails before any GPU run:
import unittest
from gatedtrain.ext.conformance import AdapterConformance
class TestConformance(AdapterConformance, unittest.TestCase):
ADAPTER = "my_adapter"
gatedtrain.testing provides the shared test helpers (canonical JSON and manifest hashes, CLI subprocess runs) and a
synthetic adapter, gatedtrain.testing.synthetic: a complete, small example of the adapter interface that
gatedtrain's own tests run on. It is registered only when a test asks for it (install() in process, or
python -m gatedtrain.testing.synthetic <gatedtrain arguments> for a CLI run), never by an installed distribution.
Recipe repositories¶
Each recipe ships its own adapter and runtime instructions.
| Task | Recipe |
|---|---|
| Math reasoning | TRL GRPO on GSM8K |
| Drone control | Stable-Baselines3 PPO |
| Image generation | DDPO with SD1.5 |
| Image generation for OCR | Flow-GRPO with SD3.5 |
| Video generation | Flow-GRPO with Wan |
| Speech recognition | Whisper SFT on AMI |
| Text-to-speech | CosyVoice DPO |
| CAD | NeMo RL for CAD |
| Visual reasoning | NeMo RL on CLEVR |
| Robot manipulation | LeRobot SmolVLA on LIBERO |
| Agentic math | NeMo RL for agentic math |