Repository navigation
eva: joint-space mode for the ABC YAM action space; robot image history - #702
Draft
aidang3019 wants to merge 20 commits into
Draft
aidang3019 wants to merge 20 commits into
aidang3019 wants to merge 20 commits into
Conversation
Contributor
Author
|
ABC fine-tune + abc_sim rollout pipeline (stacked on #691), for comparing pretraining runs by closed-loop sim success where offline metrics look alike. Operator doc:
Fixes to code below this PR (each its own commit):
Tests. New unit tests cover the joint pipeline, the converter, the server (sample equals dataset sample; HTTP round trip), and an end-to-end CPU check: train a tiny RDT, save it, serve it, infer. Full Not yet run. The sim rollouts need ABC's venv on Lambda, which is pending. 🤖 Generated with Claude Code |
This was referenced Sep 29, 2026
Contributor
Author
4 tasks
ABC's station and its simulator (amazon-far/abc abc_sim) act in 14-D
absolute joint positions + gripper, [left j1..j6, left grip, right j1..j6,
right grip]. ABC zarrs already carry {left,right}.{obs,cmd}_{joints,gripper},
so a joint-space policy can train on real and sim ABC episodes with one
schema and be stepped in the sim without IK.
- Eva transform/keymap mode "joints": observations.state.joint_positions
(14) and actions_joints (100, 14), the 45 raw 30 Hz steps resampled to the
model horizon like the cartesian modes; no revert.
- Embodiment.get_keymap(image_history_gap_s=...): the "_hist" front camera
Human already had, so a robot domain can share an RDT trunk with
trunk.image_history: 2.
- layout_metrics(..., ac_key): actions_joints* get joint metrics (abs error in
degrees, gripper MSE). A 14-D chunk otherwise reads as cartesian ypr.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ckpt_path is a full Lightning resume (optimizer, schedule, epoch) and fails on keys a new embodiment adds, so a human-pretrained RDT could not be fine-tuned on robot data from this stack. The loader that did this on aidan/abc-stationery-pi never reached main. init_weights_ckpt=<ckpt> copies every name+shape-matched tensor and leaves the rest (a new embodiment's stems / head, a different action width) at their fresh init. It raises when under init_weights_min_fraction (0.5) of the model's elements matched, so an unrelated checkpoint cannot silently "fine-tune" from random init, and it is skipped whenever ckpt_path is set, so a Slurm requeue resumes the run's own weights. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
amazon-far/abc publishes 24 simulator tasks of teleop data (sim_224, 412 h)
as states_actions.bin + a stacked 3-camera mp4 per episode. The converter
writes each episode as an eva_bimanual zarr with the real ABC zarrs' keys
({left,right}.{obs,cmd}_{joints,gripper}, images.{front_1,left_wrist,
right_wrist}, annotations), so Eva's "joints" keymap reads real and sim ABC
alike.
- episodes are selected by task_name (prepare.py extracts every task into
one {train,val}_sim folder) and keep ABC's own split as metadata `split`,
plus lab=abc_sim and the source episode id;
- prompts follow ABC's rule (prompt_timeline > instruction > task name) with
the "sim " prefix ABC trains and evaluates sim episodes with;
- intrinsics are the sim's fovy-58 pinhole at the stored resolution;
- idempotent (done marker + tmp dir + rename), parallel, one bad episode is
reported in conversion_report.json instead of stopping the task.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The model and data side of the ABC sim pipeline (egomimic/scripts/abc_sim/ README.md): - model/rdt_1b_abc_joints_dinov3_vitb: the 1B DiT with an eva_bimanual head and state stem in the ABC station's 14-D joint space beside the mecka human head (shared trunk, tower and text stem). - data/abc_sim_joints (converted sim_224 episodes, ABC's own train/val split), abc_real_joints (lab=abc on the mirror; the 2026-09-01 relabel makes lab+task+path the stable filter; front frames resized to one size because ABC mixes 640x480 and 1280x720), abc_sim_joints_cotrain_mecka (single-task human+robot cotrain, one batch of each per step). - train_zarr_abc_sim_rdt_ft / _real_rdt_ft / _sim_rdt_cotrain recipes and evaluator/eval_hpt_abc_joints: joint metrics for the robot, the wrist-frame 6D overlay for the human; an embodiment without a viz entry gets metrics only. - train_zarr_fold_ladder_rdt1b: the RDT recipe at 1B on one rung of the mecka freeform-fold operator ladder (k = 1/2/4), 1000 x 100 steps, a checkpoint every 100 epochs -- the bases the ABC fine-tunes start from. - Eva keymap "joints_front" (front camera only) and get_transform_list image_hw (ResizeImages) for mixed-resolution sources. - EGOVERSE_EPISODE_TABLE: the S3 resolver reads a pickled episode-table snapshot where there is no SQL (Lambda). - scripts/abc_sim/lambda_pack.sbatch: several small-DDP runs on one exclusive loaner node, datasets staged to node-local /ephemeral first. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Closed-loop evaluation of a joint-space checkpoint in ABC's simulator. The sim's Python (py3.12, MuJoCo 3.8, torch 2.11) cannot share the training venv, so the policy is served over HTTP + JSON (stdlib both ends): - policy_server.py builds the model input exactly as ZarrDataset builds a training sample for the checkpoint's data config (same keymap, transform list, the _hist frame image_history_gap_s earlier, fps) and normalizes it with the checkpoint's norm stats before process_batch_for_training -- the dataset normalizes in __getitem__, which the robot rollout skipped. - sim_client.py runs in ABC's venv on abc_minimal's SimTaskEnv with ABC's evaluators and eval defaults (seeded worlds, 15 executed steps per inference, 236 chunks, early stop on success), no RTC; summary.json has ABC's fields. --policy hold is the no-motion floor. - rollout_lambda.sbatch runs both in one container step on one H100. tests/unit/test_policy_server.py: the server's sample equals the dataset's for the same frames, normalization happens before the model, and the HTTP round trip. Co-Authored-By: Claude Fable 5.1 <[email protected]>
val_vs_sim.py: from a manifest of checkpoints (W&B run, epoch, ladder hours, rollout summary.json), Spearman / Pearson between the validation metric and success_rate / mean_max_progress with bootstrap CIs, and the log-linear fit of the metric (and success) against data hours across the ladder's final checkpoints. report.json + report.md. Co-Authored-By: Claude Fable 5.1 <[email protected]>
ZarrDataset reads the _hist frame round(gap_s * fps) frames back; the server compared timestamps in seconds and, at 1/30 s resolution, could pick one frame too far back. Same frame arithmetic now; the equality test covers t = 0..11. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ytail pass Fixes found by an audit of this branch against ABC's code: - policy_server could not start: it called .to()/.eval() on the algo, a plain object; the Lightning wrapper owns and moves the nets. - The served chunk played 2.2x too slow: the model's 100 steps span 45 raw 30 Hz frames (JOINT_RAW_HORIZON resampled to 100), and the client executed one per 30 Hz step. The server now resamples back onto the 45-frame grid, so the 15 executed steps are 0.5 s of the plan, as in ABC. - The _hist frame went 0.5-1.5 s stale: the server only ever saw re-plan frames. The client now renders the frame lag_frames (3) steps before each re-plan and sends it; the server is stateless. - Checkpoints stored only the model config, so a rollout could not rebuild the training inputs (robot/rollout.py's transform-mode lookup always fell back to the legacy ypr pipeline). The config tree now also carries each dataset's resolved keymap + transform list. - sim_client now drives ABC's own rollout_worlds + build_summary (the unplaceable-seed retry, chunk metrics, resolved physics, the summary fields) through an HTTP policy with ABC's infer() surface, instead of a hand copy of that loop. - Prompts: the converter keeps ABC's rule verbatim (no "sim " forced onto instruction/timeline prompts); the client conditions on the training prompt (the task name) by default, --prompt env for the randomized tasks. The two differed on 4 of the 7 candidate tasks. Episodes ABC's loader drops as unlabelled are skipped; a states/metadata length mismatch raises. Ponytail pass (less code, same behaviour): tasks.py deleted (every sim_224 task_name is already an abc_sim alias); val_vs_sim on scipy.stats; the cotrain data config inherits mecka_all_6d instead of copying it; the init_weights report dict and its min-fraction config knob removed (the guard stays); the unreachable stereo-camera alias and --limit removed; config headers cut to their role line (one pointed at a file that does not exist); config-echo tests replaced by an end-to-end test: train a tiny RDT, save the checkpoint, serve it with policy_server, infer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…are GPUs The /ephemeral staging ran in the batch shell, so the documented "bash this file with SLURM_JOB_ID=<running job>" use copied onto the gateway, which has no /ephemeral. It is now a step. Run steps --overlap so they can share a running allocation's (mostly idle) CPUs; harmless in an exclusive one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ner nodes) Co-Authored-By: Claude Opus 5.5 <[email protected]>
_metric_frames_per_episode scaled K by devices * num_nodes on the premise that a DistributedSampler strides the val split across ranks. The val heads come back inside CombinedLoaders, which Lightning does not wrap (every rank runs every val batch; measured 2026-09-16, EvalVideo._video_fps), so on W GPUs each rank scored the first 1/W of a W-times-denser subsample, in episode-hash order: on the freeform unseen-operator head at 2 GPUs, half of the 35 episodes. K is now the single-rank value on every rank. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The replay's stride inference only fits keypoint layouts and falls back to 1 on the 12-D cartesian revert: a 3.4x-slow GT/pred replay that drifts off the hand. The mecka cartesian chunk is 30 raw frames resampled to 100. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The srun step now asks for exactly one GPU (--exact --overlap), so the script can be run with bash and SLURM_JOB_ID=<held job> next to other steps (fine-tunes, other rollouts); PORT is overridable for that case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Flags and fields nothing sets or reads: converter --splits/--overwrite and three unread metadata keys; policy_server --host/--device, /health ok+horizon and the response dt; sim_client --camera-backend/--gpu-id (ABC's defaults) and an unused constructor arg; val_vs_sim --no-wandb (a row carrying val is the signal). One-caller helpers inlined (episode_hash, the joint layout dict), unused kwargs dropped from the joint transform builder, the init-weights file pre-check dropped (torch.load raises the same error), and a config-echo test removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…te OUT Found running the sim-validation hold floor on Lambda: under set -u the srun line expanded the unset CKPT and the step died, and a relative OUT resolved inside $ABC because the client cd's there before writing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
aidang3019
force-pushed
the
ryanco/replay-fractional-stride
branch
from
September 30, 2026 01:07
b99295a to
bf4981a
Compare
aidang3019
force-pushed
the
aidan/abc-sim-pipeline
branch
from
September 30, 2026 01:07
82baa9a to
57eeaf8
Compare
…ends On the Lambda loaner a finished step does not reap processes it backgrounded (no proctrack/cgroup), so every rollout left its policy_server running with ~8 GB on the GPU and the port taken. Kill the shell's jobs on EXIT. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- train_zarr_abc_real_rdt: the base RDT (width 1024, the architecture of Ryan's rdt_mem_all checkpoints) on the 100 real ABC bottles episodes, 4 GPUs, 100k steps. The prompt is fixed in the model (default_prompt, no annotation track) and there is no image history, so a client that sends the current frames and the 14-D joint state can drive it: the abc_sim client, or an ABC-replica station. - model/rdt_abc_joints_dinov3_vitb: the ABC joints head on the base RDT; rdt_1b_abc_joints now inherits it at width 2048 (resolved configs unchanged). - embodiment: YAM_* collapses to EVA_*. The Lambda (R2) copies of the real ABC zarrs say yam_bimanual since the 2026-09-01 SQL relabel. This reverses test_pi05_norm_rot6d's "robot names are never aliased" assertion. - test: the real recipe trains two steps and its checkpoint serves without a history frame, using the model's own prompt. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The loaner partition's DefMemPerGPU=256000 MB times 8 GPUs exceeds a node's
2,000,000 MB, so a full-node request is rejected ("Requested node configuration
is not available"); Ryan's jobs request 225G per GPU.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
abc_sim load_plates_into_dish_rack (robot, joints) + the Mecka episodes whose description has dishes and a rack (human, wrist-frame 6D; 232 episodes, 5.4 h), one batch of each per step, on the base RDT from scratch with the real-bottles recipe's deployable settings (fixed robot prompt, no image history), one full node. The dish rack is the one task in abc_sim, the real ABC data and Mecka. Co-Authored-By: Claude Opus 5.5 <[email protected]>
RyanPCo
changed the base branch from
ryanco/replay-fractional-stride
to
graphite-base/702
October 12, 2026 20:01
graphite-app
Bot
changed the base branch from
graphite-base/702
to
ryanco/replay-fractional-stride
October 19, 2026 19:56
abc_sim load_plates_into_dish_rack alone on the base RDT from scratch, with the same deployable settings and dish-rack prompt as train_zarr_abc_sim_dishrack_rdt_cotrain. Co-Authored-By: Claude Opus 5.5 <[email protected]>
RyanPCo
force-pushed
the
aidan/abc-sim-pipeline
branch
from
October 19, 2026 19:56
cdda432 to
2248a75
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

eva: joint-space mode for the ABC YAM action space; robot image history
ABC's station and its simulator (amazon-far/abc abc_sim) act in 14-D
absolute joint positions + gripper, [left j1..j6, left grip, right j1..j6,
right grip]. ABC zarrs already carry {left,right}.{obs,cmd}_{joints,gripper},
so a joint-space policy can train on real and sim ABC episodes with one
schema and be stepped in the sim without IK.
(14) and actions_joints (100, 14), the 45 raw 30 Hz steps resampled to the
model horizon like the cartesian modes; no revert.
Human already had, so a robot domain can share an RDT trunk with
trunk.image_history: 2.
degrees, gripper MSE). A 14-D chunk otherwise reads as cartesian ypr.
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
train: init_weights_ckpt, a weights-only fine-tune init
ckpt_path is a full Lightning resume (optimizer, schedule, epoch) and fails
on keys a new embodiment adds, so a human-pretrained RDT could not be
fine-tuned on robot data from this stack. The loader that did this on
aidan/abc-stationery-pi never reached main.
init_weights_ckpt= copies every name+shape-matched tensor and leaves
the rest (a new embodiment's stems / head, a different action width) at
their fresh init. It raises when under init_weights_min_fraction (0.5) of
the model's elements matched, so an unrelated checkpoint cannot silently
"fine-tune" from random init, and it is skipped whenever ckpt_path is set,
so a Slurm requeue resumes the run's own weights.
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
abc_sim: convert ABC sim_224 teleop episodes to EgoVerse zarrs
amazon-far/abc publishes 24 simulator tasks of teleop data (sim_224, 412 h)
as states_actions.bin + a stacked 3-camera mp4 per episode. The converter
writes each episode as an eva_bimanual zarr with the real ABC zarrs' keys
({left,right}.{obs,cmd}_{joints,gripper}, images.{front_1,left_wrist,
right_wrist}, annotations), so Eva's "joints" keymap reads real and sim ABC
alike.
one {train,val}_sim folder) and keep ABC's own split as metadata
split,plus lab=abc_sim and the source episode id;
the "sim " prefix ABC trains and evaluates sim episodes with;
reported in conversion_report.json instead of stopping the task.
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
abc: RDT-1B joint-space recipes, the fold ladder, a Lambda pack launcher
The model and data side of the ABC sim pipeline (egomimic/scripts/abc_sim/
README.md):
and state stem in the ABC station's 14-D joint space beside the mecka
human head (shared trunk, tower and text stem).
split), abc_real_joints (lab=abc on the mirror; the 2026-09-01 relabel
makes lab+task+path the stable filter; front frames resized to one size
because ABC mixes 640x480 and 1280x720), abc_sim_joints_cotrain_mecka
(single-task human+robot cotrain, one batch of each per step).
evaluator/eval_hpt_abc_joints: joint metrics for the robot, the wrist-frame
6D overlay for the human; an embodiment without a viz entry gets metrics
only.
mecka freeform-fold operator ladder (k = 1/2/4), 1000 x 100 steps, a
checkpoint every 100 epochs -- the bases the ABC fine-tunes start from.
image_hw (ResizeImages) for mixed-resolution sources.
snapshot where there is no SQL (Lambda).
exclusive loaner node, datasets staged to node-local /ephemeral first.
Co-Authored-By: Claude Fable 5.1 [email protected]
abc_sim: policy server, sim client, Lambda rollout launcher
Closed-loop evaluation of a joint-space checkpoint in ABC's simulator.
The sim's Python (py3.12, MuJoCo 3.8, torch 2.11) cannot share the training
venv, so the policy is served over HTTP + JSON (stdlib both ends):
training sample for the checkpoint's data config (same keymap, transform
list, the _hist frame image_history_gap_s earlier, fps) and normalizes it
with the checkpoint's norm stats before process_batch_for_training -- the
dataset normalizes in getitem, which the robot rollout skipped.
evaluators and eval defaults (seeded worlds, 15 executed steps per
inference, 236 chunks, early stop on success), no RTC; summary.json has
ABC's fields. --policy hold is the no-motion floor.
tests/unit/test_policy_server.py: the server's sample equals the dataset's
for the same frames, normalization happens before the model, and the HTTP
round trip.
Co-Authored-By: Claude Fable 5.1 [email protected]
abc_sim: val-metric vs sim-success report
val_vs_sim.py: from a manifest of checkpoints (W&B run, epoch, ladder
hours, rollout summary.json), Spearman / Pearson between the validation
metric and success_rate / mean_max_progress with bootstrap CIs, and the
log-linear fit of the metric (and success) against data hours across the
ladder's final checkpoints. report.json + report.md.
Co-Authored-By: Claude Fable 5.1 [email protected]
policy_server: the history lag in frames, as the dataset reads it
ZarrDataset reads the _hist frame round(gap_s * fps) frames back; the
server compared timestamps in seconds and, at 1/30 s resolution, could pick
one frame too far back. Same frame arithmetic now; the equality test covers
t = 0..11.
Co-Authored-By: Claude Fable 5.1 [email protected]
abc_sim: audit fixes (chunk timing, history frame, server load) + ponytail pass
Fixes found by an audit of this branch against ABC's code:
object; the Lightning wrapper owns and moves the nets.
30 Hz frames (JOINT_RAW_HORIZON resampled to 100), and the client executed
one per 30 Hz step. The server now resamples back onto the 45-frame grid,
so the 15 executed steps are 0.5 s of the plan, as in ABC.
frames. The client now renders the frame lag_frames (3) steps before each
re-plan and sends it; the server is stateless.
the training inputs (robot/rollout.py's transform-mode lookup always fell
back to the legacy ypr pipeline). The config tree now also carries each
dataset's resolved keymap + transform list.
unplaceable-seed retry, chunk metrics, resolved physics, the summary
fields) through an HTTP policy with ABC's infer() surface, instead of a
hand copy of that loop.
instruction/timeline prompts); the client conditions on the training prompt
(the task name) by default, --prompt env for the randomized tasks. The two
differed on 4 of the 7 candidate tasks. Episodes ABC's loader drops as
unlabelled are skipped; a states/metadata length mismatch raises.
Ponytail pass (less code, same behaviour): tasks.py deleted (every sim_224
task_name is already an abc_sim alias); val_vs_sim on scipy.stats; the
cotrain data config inherits mecka_all_6d instead of copying it; the
init_weights report dict and its min-fraction config knob removed (the guard
stays); the unreachable stereo-camera alias and --limit removed; config
headers cut to their role line (one pointed at a file that does not exist);
config-echo tests replaced by an end-to-end test: train a tiny RDT, save the
checkpoint, serve it with policy_server, infer.
Co-Authored-By: Claude Opus 5.5 [email protected]
lambda_pack: stage data from a node step; run onto a running job's spare GPUs
The /ephemeral staging ran in the batch shell, so the documented "bash this
file with SLURM_JOB_ID=" use copied onto the gateway, which has
no /ephemeral. It is now a step. Run steps --overlap so they can share a
running allocation's (mostly idle) CPUs; harmless in an exclusive one.
Co-Authored-By: Claude Opus 5.5 [email protected]
lambda_pack: stage to node-local /tmp (/ephemeral is root-only on loaner nodes)
Co-Authored-By: Claude Opus 5.5 [email protected]
eval: the val subsample K is per-rank; the val loaders are not sharded
_metric_frames_per_episode scaled K by devices * num_nodes on the premise
that a DistributedSampler strides the val split across ranks. The val heads
come back inside CombinedLoaders, which Lightning does not wrap (every rank
runs every val batch; measured 2026-09-16, EvalVideo._video_fps), so on W
GPUs each rank scored the first 1/W of a W-times-denser subsample, in
episode-hash order: on the freeform unseen-operator head at 2 GPUs, half of
the 35 episodes. K is now the single-rank value on every rank.
Co-Authored-By: Claude Opus 5.5 [email protected]
fold ladder: the true replay stride (29/99 frames per chunk step)
The replay's stride inference only fits keypoint layouts and falls back to
1 on the 12-D cartesian revert: a 3.4x-slow GT/pred replay that drifts off
the hand. The mecka cartesian chunk is 30 raw frames resampled to 100.
Co-Authored-By: Claude Opus 5.5 [email protected]