User Guide · Policies · Adding a policy

Adding a new policy

Plugging a new VLA backbone into MetaFine is a three-function exercise. Below is the complete, minimal evaluate.py skeleton — once your subpackage exposes these symbols, every MetaFine task graph, DR sweep, and smoothness metric works for free.

How policies actually plug in

There is no universal adapter or "3-function contract". Each backbone is a self-contained subpackage under core/policies/<name> with its own pyproject.toml, its own (often conflicting) dependency pins, and its own standalone evaluate.py (plain argparse) plus a README.md documenting that backbone's exact flags.

Adding one

  1. Vendor the upstream policy code under core/policies/<name>/ with a pyproject.toml so pip install -e core/policies/<name> works in isolation.
  2. Feed it MetaFine data via the standard pipeline — convert to LeRobot or RLDS depending on what the backbone expects.
  3. Write an evaluate.py that builds a MetaFine env with gym.make(<env_id>) (the registered env ids — see Task catalogue), runs the policy closed-loop, and reports success / metrics.
  4. Write a short core/policies/<name>/README.md documenting the exact train + eval commands.

Reference implementation

Copy the structure of core/policies/pi05 — it has a clean evaluate.py (argparse), a run_eval_three_stage.sh staged-diagnostic wrapper, and a thorough README.md. core/policies/starvla is the reference for the training side.