Repository navigation
feat(cli): t4migrate migrates a 0.x dataset to 1.0 - #317
Merged
Merged
Conversation
jacoblambert
force-pushed
the
v1/migrate
branch
from
October 15, 2026 05:40
bd85a3f to
60f73ed
Compare
jacoblambert
force-pushed
the
v1/write
branch
from
October 15, 2026 05:40
b4370fc to
4c1df11
Compare
jacoblambert
force-pushed
the
v1/migrate
branch
from
October 15, 2026 08:26
60f73ed to
c5dae0c
Compare
jacoblambert
force-pushed
the
v1/write
branch
from
October 15, 2026 08:26
4c1df11 to
97a4014
Compare
jacoblambert
force-pushed
the
v1/migrate
branch
from
October 15, 2026 10:37
c5dae0c to
9d9c504
Compare
jacoblambert
force-pushed
the
v1/write
branch
2 times, most recently
from
October 21, 2026 01:31
6771c60 to
c044b97
Compare
jacoblambert
force-pushed
the
v1/migrate
branch
from
October 21, 2026 01:31
9d9c504 to
0f658b2
Compare
ktro2828
self-requested a review
October 21, 2026 05:31
jacoblambert
force-pushed
the
v1/write
branch
from
October 22, 2026 09:56
c044b97 to
bf1cea8
Compare
jacoblambert
force-pushed
the
v1/migrate
branch
from
October 22, 2026 09:57
0f658b2 to
98a9a47
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.
Summary
This PR adds
t4migrate. It turns a 0.x dataset into a new 1.0 dataset. The 0.x dataset is only read.It writes
<OUTPUT_DIR>/<DATASET_ID>/<N>, prints the migration notes, and runst4sanityon the result. It exits with1if a sanity rule fails.The version comes from the caller, because Web.Auto assigns it on upload. Migration will run in Web.Auto.
V0Migratordoes the same in Python, channel by channel or all at once withmigrate().What it does
Tables are loaded with
load_dataset(), as 1.0 records. Then each channel is rewritten, and itssensorandsample_datarecords are updated.LiDAR: one Parquet file per channel, one row group per frame.
intensityuint8) when every value fits.channel) that is-1on every point was not recorded. It is dropped, with a note..infofiles becomesource_indexandsource_timestamp.source_indexis the source LiDAR'ssensor.index.labelandinstance. 0.x labels are semantic only, soinstanceis0. Frames without labels arenull. Category0must beunpainted, or the migration stops.sensorrow and get the merged file's format and fields.Cameras: one AV1 video per channel, frames in timestamp order.
--keep-imagescopies the images instead.is_valid: falseare 0.x placeholders for dropped frames. They are encoded as they are, so the records stay 1:1 with 0.x. We can drop them in the converter for new data.Every channel:
nextandprevare set from timestamp order. Some 0.x placeholder frames are only half linked: they point to their neighbors, but the neighbors skip them. Each fix is noted.map/andinput_bag/are copied as they are.manifest.jsonhasmigrated_from_schema_version: "0.x"and the notes. 0.x has no provenance, so it stays empty for backfilling. The recording start and end are the first and last sample times, with a note.Tests
-1and lidarseg. Intensity becomes uint8, the ring is dropped, and labels appear only on the labeled frame. Without anunpaintedcategory, it is refused.Checked on real data
LiDAR on 4 datasets (4, 5, 7 and 9 columns): every frame matches the 0.x values.
Full migration of 7aa8888b (lidarseg, 8 merged LiDARs, 6 cameras, input bag):
input_bag/,map/Sanity: 101 passed, 0 failed. The 2 warnings are the placeholder vehicle and map IDs (to backfill) and hashes not re-checked. 6 rules are skipped because this dataset has no boxes. The first run found the half-linked camera frame (
REF107), which is why relinking is in this PR.One camera frame (CAM_FRONT, 2880x1860): video is 0.18 of the JPG size, 37–38 dB against the JPGs, 69 ms per frame to encode.
Not in this PR