Skip to content

lance_pilot: migrate pilot tables to one lab column and end_effector - #741

Open
RyanPCo wants to merge 4 commits into
ryanco/lance-annotations-stagefrom
ryanco/lance-migrate-pilot
Open

RyanPCo wants to merge 4 commits into
ryanco/lance-annotations-stagefrom
ryanco/lance-migrate-pilot

Conversation

@RyanPCo

@RyanPCo RyanPCo commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

The pilot roots were written with lab = source format ("aria"/"eva"), site =
collecting lab, and steps/{aria,eva}.lance. The tables now have one lab column (the
collecting lab), a required end_effector, and steps tables at
steps/{lab}/{embodiment}/{end_effector}.lance, so the pilot roots need a one-off copy
into the new layout before the new readers can use them.

egomimic/scripts/lance_pilot/migrate_lab_end_effector.py merges one or more old roots
(--src, repeatable) into a new root (--dst), never in place:

  • recordings: site becomes lab, end_effector comes from the old lab (aria ->
    hand, eva -> gripper). Null sites fail unless --lab-for-null-site is given.
  • steps: every old steps table is split by its recordings' new (lab, embodiment,
    end_effector) in source row order. Steps rows of recordings missing from
    recordings.lance need --drop-orphan-steps.
  • tasks, aliases, annotations and changes are unioned across sources; a recording_id or
    alias episode_hash found twice fails the run. recording_id is unchanged (its hash
    input stays "aria/").
  • changes: the old lab becomes source, and steps_tables lists the steps tables
    each batch's recordings now live in ([] for annotation commits).
  • the legacy tasks.annotations column is dropped; --dry-run counts the rows that carry
    one.
  • videos/ and other files are copied as is (video_path is root-relative).
  • row counts and recording placement are verified after writing.

Lance history is not carried over: every new table starts at version 1 and is tagged
--tag (default migrate-lab-end-effector). Old tags are listed and dropped; changes.tag
keeps naming them.

Run on the two pilot roots (/coc/flash7/scratch/lance_pilot/lance and lance_eva) into
/coc/flash7/scratch/lance_pilot/lance_v2 (5.5G); the source roots are unchanged:

  • 99 recordings, 99 tasks, 99 aliases, 0 annotations; neither source had a changes table.
  • 12 steps tables. The hand tables total 381,921 rows and the gripper tables 49,000, the
    same as the old steps/aria.lance and steps/eva.lance.
  • 0 non-empty tasks.annotations rows dropped.

The branch also points aria_pilot_lance.yaml, eva_pilot_lance.yaml and the lance_pilot
bench/check scripts at lance_v2; the old roots keep the old schema, which the stack no
longer reads.

Testing: on a compute node, test_lance_migrate_lab_end_effector, test_lance_commit and the
pilot cases of test_data_configs_compose pass (25 passed). LanceStreamingResolver reads
frames from lance_v2 for 34 aria human_bimanual and 49 eva_bimanual recordings.

https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw

@RyanPCo
RyanPCo force-pushed the ryanco/lance-migrate-pilot branch from 66443e0 to de074f0 Compare October 23, 2026 19:36
@RyanPCo
RyanPCo force-pushed the ryanco/lance-annotations-stage branch from 879a5a7 to 6c62f33 Compare October 23, 2026 19:36
The schema is moving to `lab` = collecting lab (old `site`), a required
`end_effector` column, and steps tables keyed steps/{lab}/{embodiment}/{end_effector}.lance.
The pilot roots were written with lab = source format and steps/{aria,eva}.lance,
so they need a one-off copy into the new layout before the new readers can use them.

The script merges one or more old roots (--src, repeatable) into a new root, never in
place: it splits every old steps table by its recordings' new key in source row
order, unions tasks/aliases/annotations/changes, fails on recording_id or alias
episode_hash collisions across sources, drops the legacy tasks.annotations column
(dry-run counts the non-empty rows), copies videos and other files as is (video_path
is root-relative), maps changes rows to the new key in one function, refuses null
sites unless --lab-for-null-site is given, and verifies row counts and recording
placement after writing. Lance history is not carried over; new tables are tagged
instead. NEW_RECORDINGS_COLUMNS must match schema.RECORDINGS once that commit lands.

Claude-Session: https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw
The schema commit landed, so the migration takes the recordings columns from
schema.RECORDINGS (null content_digest for roots that predate it), end_effector values
from END_EFFECTOR and table paths from steps_path instead of local copies. Changes rows
follow the landed design: one row per old row, the old `lab` becomes `source`, and
`steps_tables` lists the steps tables its recordings live in ([] for annotation commits).

Claude-Session: https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw
The aria and eva pilot roots were merged into /coc/flash7/scratch/lance_pilot/lance_v2
with the new lab/end_effector schema and per-key steps tables; the old roots use the
pre-migration schema the readers no longer accept.

Claude-Session: https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw
The old roots keep the pre-migration schema, which the stack no longer reads.

Claude-Session: https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw
@RyanPCo
RyanPCo force-pushed the ryanco/lance-annotations-stage branch from 6c62f33 to 5c415cf Compare October 23, 2026 20:03
@RyanPCo
RyanPCo force-pushed the ryanco/lance-migrate-pilot branch from de074f0 to 546c4fa Compare October 23, 2026 20:03
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