Add a Policy¶
Learned-policy integrations live under source/am_isaac_il/am_isaac_il/policies/<family>/. A new integration should preserve the canonical dataset boundary and the common evaluation user experience.
1. Declare the data contract¶
Start from a validated canonical LeRobot dataset. Document the accepted action_semantics, ordered state keys, camera features, logical policy rate, history, prediction horizon, and model representation. If conversion is required, write a derived dataset without modifying the source.
Keep transforms under am_isaac_il.data or am_isaac_il.pipeline when they are shared. Policy-specific model preprocessing stays with the policy family.
2. Implement training and checkpoint metadata¶
The training entry point should save enough metadata to reject mismatched evaluation: policy rate, state and action representation, cameras, normalization, task or language conditioning, and source semantics. Paths should be command arguments rather than local constants.
3. Use the common evaluator¶
Add the shared CLI with add_common_eval_args(...), validate arguments before Isaac Sim starts, and use resolve_eval_output_dir, EvalRun, and run_evaluation_batches. Convert model predictions back to the environment action representation before env.step(...).
Match the common progress, video, and artifact behavior described in Evaluation Outputs. Add policy-only arguments only for genuine runtime differences, such as a remote server address.
4. Validate the complete path¶
Run these gates in order:
- static dataset validation at the intended policy rate;
- one or a few training steps that save a loadable checkpoint;
- checkpoint reload in a clean process;
- one rollout with one environment and explicit output directory;
- inspection of
results.txt,eval_summary.json, tracking analysis, and requested videos; - a larger evaluation only after the smoke path passes.
Training loss alone does not validate action conversion or simulator evaluation.