Skip to content

6D pi data transform - #487

Draft
aidang3019 wants to merge 4 commits into
elmo/pi-raw-rot6dfrom
aidan/pi-6d
Draft

6D pi data transform#487
aidang3019 wants to merge 4 commits into
elmo/pi-raw-rot6dfrom
aidan/pi-6d

Conversation

@aidang3019

Copy link
Copy Markdown
Contributor

No description provided.

aidang3019 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@aidang3019
aidang3019 force-pushed the elmo/pi-raw-rot6d branch from bee8d0b to 79dae92 Compare July 7, 2026 02:57
This was referenced Jul 8, 2026
@ElmoPA
ElmoPA force-pushed the elmo/pi-raw-rot6d branch 2 times, most recently from dead146 to 5b6e729 Compare July 9, 2026 01:40
Aidan Gao and others added 2 commits August 28, 2026 11:19
- eva/human cartesian_6d + wristframe_6d modes 6D-encode
  observations.state.ee_pose (revert lists convert it back before the
  eef-frame revert) so proprio normalization avoids the ±π yaw/roll wrap
- bounds checking skips rotation channels of actions_cartesian / ee_pose
  via BIMANUAL_CARTESIAN_LAYOUTS (ported from the wristframe-6d stack)
- pi0.5_base: constant-with-warmup LR schedule (cosine decayed to 0 @ 60k)
- new pi0.5_bc_mecka_6d + mecka_all_pi_6d configs: all SQL mecka episodes,
  bs 64, cartesian_6d stride 1, proprio in prompt, no embodiment label

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Aidan Gao and others added 2 commits August 28, 2026 17:53
… Rz(180) fix

Squash of the two mecka-all pipeline commits that used to sit inside
aidan/eval_gating, so the whole wristframe 6D pipeline lives on this
branch.

mecka-all launch infra (was a8ae76b):
- pi0.5_base default_prompt "" (was "This is a bad action."; remote parity
  — applies to frames outside any annotation span)
- mecka_all_pi_6d: cartesian_wristframe_6d stride 1 — 18D wrist-relative
  actions (world frame AND moving head frame cancel out of the targets),
  head-frame 6D proprio; shared PACE mirror folder_path; DatasetFilter
  lambda (dict filters raise in the zarr resolver path)
- get_embodiment_id: vendor-tagged human names (MECKA_/SCALE_/ARIA_/
  LIGHTWHEEL_*) collapse to HUMAN_* — mirror episodes carry MECKA_BIMANUAL
  metadata from the vendor-split registry
- norm collection: float32 + 2M-sample cap (a 0.1-frac (N,100,18) float64
  stack plus np.percentile's sort copy is ~250GB)
- precompute_norm_stats.py: CPU port of the remote's script against the
  local trainHydra norm loop; sbatch variants (24c CPU / 1xa100 32c /
  2xa100 64c) + smoke (viz gate proof) + 8xH200 train scripts, paired
  with evaluator=eval_pi_wristframe_6d

fix mecka left wrist frame (was 68ef3aa):
- mecka_to_zarr.compute_hand_pose_xyzquat double-mirrored the LEFT hand
  onto the right hand's spatial convention (palm normal from
  cross(thumb, pinky) already mirrors chirality; rot_left flipped x/y
  again). Converter fixed; RotateLocalFrame + the fix_mecka_left_wrist
  data-config flag right-multiply the stored left pose keys by Rz(180°)
  before any frame math, exactly equivalent to reconverting processed_v3.
- viz_mecka_episode / viz_eva_episode debug renderers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-stats provenance, independent round-trip tests

Adversarial review of the wristframe 6D pipeline (2026-08-28) found no
math bug: the forward transform, quantile normalization, 32D pack/unpack
and the evaluator revert all round-trip to float32 precision against
independent SE(3) math, for both embodiments and both left-wrist
conventions. It did find three silent-failure modes:

- SplitKeys sliced an 18/20-dim 6D batch as "xyz + ypr" without complaint
  whenever an evaluator's ypr revert list was paired with a *_6d data
  config (eval_pi.yaml vs cartesian_wristframe_6d). It now raises with the
  widths and points at transform_lists.
- MultiDataset._check_bounds compared strictly against quantile bounds
  that collapse to [0, 0] at t=0 of wrist-frame chunks (the reference IS
  the obs pose). Those cells are exactly 0.0 today, so nothing was
  rejected, but any roundoff (other BLAS / dtype) would have resampled
  every frame. Add a 1e-6 absolute tolerance, and warn once instead of
  silently skipping the key when the stats do not broadcast.
- norm_stats.json carried no provenance: a cached file from another
  norm_mode / keymap / transform mode with the same dims was applied
  as-is at train AND eval. cache_stats now writes {norm_mode, stat_shapes};
  _load_precomputed_stats refuses a norm_mode or key-set mismatch (files
  written before provenance still load, with a warning).

test_wrist6d_roundtrip.py runs the REAL Human/Eva transform lists on
synthetic world-frame poses through normalize -> to32/from32 ->
unnormalize -> revert and compares every stage with plain numpy/scipy
SE(3) math that shares no code with the pipeline (both
fix_mecka_left_wrist settings, both eva extrinsics), plus torch-vs-scipy
Euler-convention and Gram-Schmidt cross-checks and tests for the three
guards above. The existing tests only compared the pipeline with itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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