Skip to content

modify pi camera map to match data - #629

Merged
RyanPCo merged 2 commits into
mainfrom
ryanco/pi-cam-remap
Sep 22, 2026
Merged

RyanPCo merged 2 commits into
mainfrom
ryanco/pi-cam-remap

Conversation

@RyanPCo

@RyanPCo RyanPCo commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every dataset had a _pi twin of its data config that differed in exactly one line: keymap_mode: cartesian_pi, which made the dataset emit PaliGemma camera names (base_0_rgb, *_wrist_0_rgb) instead of the dataset names HPT reads. The model's input naming had leaked into the data configs, and three of the twins (aria, mecka, scale) had drifted to not even instantiate (the xfails in #626).

This PR moves the renaming into the Pi wrapper, where it belongs, and collapses the twins.

Pi wrapper — PI_CAMERA_SLOTS (egomimic/models/preprocess_pi_obs.py) maps openpi's three slots onto the dataset keys every embodiment's keymap emits; gather_pi_images pulls them from the batch, still accepting the slot names themselves as a fallback so robot rollout (which already emits both) and pre-remap checkpoints keep working. Missing wrist slots are filled from the front camera and masked out, as before. _fill_missing_images and the pi_cam_keys kwarg are gone (pi_camera_slots overrides the map if a model ever needs to).

Keymaps — the cartesian_pi branch in Eva._get_keymap and the _pi-suffix handling in Human._get_keymap are removed; a _pi mode is now a deprecated alias for the base mode (FutureWarning), so configs saved by earlier Pi runs still rebuild for eval and resume.

Data configs

  • aria_pi, mecka_pi, scale_pi deleted; Pi trains on the per-vendor configs. At this commit those still carry add tests to ensure training works between every model and data vendor #626's pins (stale for scale and mecka); the validated pins land in validate episode hashes in data config before training #628 (ryanco/phase2-pins), which stacks on top of this PR.
  • Every remaining cartesian_pi (cotrain_pi_base, cotrain_pi_lang, cotrain_pi_no_lang, eva_pi_lang, cotrain_pi_pickplace_qwen) is now cartesian.
  • industry_eva_pi and mecka_scale_cotrain_pi are distinct cotrain selections, so they stay, and get the keymap_mode/mode they never passed. Both instantiate now.
  • eva_pi stays as train_zarr_cartesian_pi's default data, now plain cartesian: every eva_bimanual episode with annotations. data=eva is a one-episode smoke config with no annotations, so it can't be the Pi default.
  • Pi's default_prompt (pi0.5_base) is now empty instead of "This is a bad action.". The three pi_cartesian* viz configs read the dataset front key.

Tests

  • tests/unit/test_pi_camera_slots.py: the slot gather (dataset names, legacy names, precedence, human front-only, BHWC, no-camera error) and the keymap rejection.
  • test_data_configs_compose.py: the five xfails are gone; new cases assert no data config uses a _pi mode and that train_zarr_cartesian_pi defaults to unpinned, annotated eva data.
  • Train-step recipes: Pi rows use the same vendor configs as HPT. They opt into annotation_key=annotations because the plain vendor configs load no language field. The tests now assert the wrapper saw dataset camera names while StubPI0 still asserts openpi's slot names, which is the remap working end to end.
  • eval_latent.py updated for the new _robomimic_to_pi_data signature.

Findings not fixed here

  • PI._sample_prompts silently falls back to default_prompt when annotation_key is set on the model but the data config never loaded that field. data=eva model=pi0.5_bc_eva trains on the empty default prompt for every sample without a warning. Worth a loud error or at least a log line.
  • The scale HPT GPU row failed twice in a row on Entire dataset bad for two different scale episodes (2026-05-02-17-05-10-632372, 2026-05-02-16-51-26-226166) picked by the pre-pin debug=2 fallback. Same data-quality class as the eva episode add tests to ensure training works between every model and data vendor #626 reported; the pins in validate episode hashes in data config before training #628 (ryanco/phase2-pins, above this PR) sidestep it.
  • Branches in the main clone (ryanco/infra-fixes, aidan/kp-wristframe-port) still say cartesian_pi in mecka_all_pi_6d and obj_gen_pi_lang; they will log a deprecation warning once this merges. One-line fixes.

Test plan

Run (Slurm) Result
pytest tests/unit on a CPU node (final restacked commit) 301 passed, 0 failed
GPU tier, tests/integration/test_train_step_gpu.py, A40, real Pi weights Pi rows eva, aria, mecka, scale: 4 passed. HPT rows eva, aria, mecka: 3 passed. HPT scale: failed on a corrupt episode (findings).

GPU runs were on the pre-restack commit (2d3f408c6). ryanco/phase2-pins now sits above this branch, so the restack reverted my edits to the eva/mecka/scale.yaml filters back to #626's pins; the GPU test overrides the episode filter anyway, and the CPU tier uses synthetic episodes. Three GPU jobs were needed: the first filled the node's local /tmp with Pi checkpoints (pytest's default basetemp), the second lacked s5cmd on PATH for uncached episodes. Both were harness setup, not code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KxKxffCeQb3aTgvia4cLYT

@RyanPCo
RyanPCo force-pushed the ryanco/pi-cam-remap branch from f3122f7 to fe0fafa Compare September 13, 2026 17:03
@RyanPCo
RyanPCo changed the base branch from ryanco/phase2-pins to graphite-base/629 September 13, 2026 17:16
@RyanPCo
RyanPCo force-pushed the ryanco/pi-cam-remap branch from fe0fafa to ab41a76 Compare September 13, 2026 17:17
@RyanPCo
RyanPCo changed the base branch from graphite-base/629 to ryanco/phase2-pins September 13, 2026 17:17
@RyanPCo
RyanPCo changed the base branch from ryanco/phase2-pins to graphite-base/629 September 13, 2026 17:47
@RyanPCo
RyanPCo force-pushed the ryanco/pi-cam-remap branch from ab41a76 to 81486c7 Compare September 13, 2026 17:47
@RyanPCo
RyanPCo changed the base branch from graphite-base/629 to ryanco/train-step-tests September 13, 2026 17:47
@RyanPCo
RyanPCo force-pushed the ryanco/pi-cam-remap branch from 81486c7 to 7ae449f Compare September 13, 2026 18:09
@RyanPCo
RyanPCo force-pushed the ryanco/train-step-tests branch from 580ca5f to 70b6073 Compare September 13, 2026 18:09
@RyanPCo
RyanPCo force-pushed the ryanco/pi-cam-remap branch from 7ae449f to 11ec5d2 Compare September 13, 2026 20:11
@RyanPCo
RyanPCo force-pushed the ryanco/pi-cam-remap branch from f6de17b to f207234 Compare September 13, 2026 21:59

RyanPCo commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Sep 22, 12:57 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 22, 12:57 PM UTC: @RyanPCo merged this pull request with Graphite.

@RyanPCo
RyanPCo merged commit a3cf76f into main Sep 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant