Add portable Level3 instructions, video references and GEM input reconstruction
Browse files- level3/README.md +94 -0
- level3/SHA256SUMS +10 -0
- level3/interleaved_input_list_for_GEM/README.md +3 -0
- level3/interleaved_input_list_for_GEM/items.parquet +3 -0
- level3/release_manifest.json +17 -0
- level3/scripts/materialize_level3.py +86 -0
- level3/text_audio_instructions/README.md +3 -0
- level3/text_audio_instructions/data.parquet +3 -0
- level3/validation.json +25 -0
- level3/video_symlinks/README.md +3 -0
- level3/video_symlinks/data.parquet +3 -0
level3/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RoboSteer Level3 preprocessing assets
|
| 2 |
+
|
| 3 |
+
This folder releases three Level3 assets as portable tables and a reconstruction tool. It is independent of the sibling `level1/` assets. The original server paths and video symlinks are not distributed.
|
| 4 |
+
|
| 5 |
+
## Assets
|
| 6 |
+
|
| 7 |
+
| Folder | Contents | Reconstructed layout |
|
| 8 |
+
|---|---|---|
|
| 9 |
+
| `text_audio_instructions/` | 17,575 UTF-8 instructions across 7,764 tasks, including original audio/text modality and order | `<task_id>/<item_id>__text.txt` or `__audio.txt` |
|
| 10 |
+
| `video_symlinks/` | 8,475 video references with paths relative to a user-provided public-data root, byte sizes and SHA-256 | `<item_id>.mp4` |
|
| 11 |
+
| `interleaved_input_list_for_GEM/` | 26,050 ordered items: 17,575 text items and 8,475 video references | `<task_id>/order_NNN.txt` or `.mp4` |
|
| 12 |
+
|
| 13 |
+
No raw audio transcripts, audio files, image assets or video bytes are included. The audio-origin instructions are processed motion instructions, not raw Whisper transcripts. The original GEM preparation skipped 7,764 image items. Original order numbers are preserved, including gaps left by skipped images.
|
| 14 |
+
|
| 15 |
+
`release_manifest.json` records the comparison between the grouped text and the actual GEM text. If differences exist, `text_overrides.parquet` preserves them for exact reconstruction; the grouped instruction table remains unchanged.
|
| 16 |
+
|
| 17 |
+
## Download
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
pip install huggingface_hub pyarrow
|
| 21 |
+
hf download PhoebeCC/RoboSteer-Preprocessing \
|
| 22 |
+
--repo-type dataset --include 'level3/*' --local-dir ./RoboSteer-Preprocessing
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
For reproducibility, add `--revision <commit-id>` using the commit of the Level3 release.
|
| 26 |
+
|
| 27 |
+
## External video dependency
|
| 28 |
+
|
| 29 |
+
Prepare the matching RoboSteer public data locally:
|
| 30 |
+
|
| 31 |
+
```text
|
| 32 |
+
<public-root>/
|
| 33 |
+
└── Data_Processed/Level3/Video_Slices/
|
| 34 |
+
└── <original segment filename>.mp4
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
The release identifies every required video using `source_relpath`, `source_size` and `source_sha256`. A matching folder layout alone is insufficient: each video must also match its recorded bytes. This release does not download or regenerate the original media.
|
| 38 |
+
|
| 39 |
+
## Reconstruct the three original assets
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
python RoboSteer-Preprocessing/level3/scripts/materialize_level3.py \
|
| 43 |
+
--public-root /data/public \
|
| 44 |
+
--output-root ./restored_level3 \
|
| 45 |
+
--video-mode symlink
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
The result is:
|
| 49 |
+
|
| 50 |
+
```text
|
| 51 |
+
restored_level3/
|
| 52 |
+
├── text_audio_instructions/
|
| 53 |
+
├── video_symlinks/
|
| 54 |
+
└── interleaved_input_list_for_GEM/
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
This reproduces the selected assets directly under the output root. To match the organized project layout, pass `--output-root /path/to/cxt/level3/inputs` instead. Use a new output directory for initial validation.
|
| 58 |
+
|
| 59 |
+
The tool verifies release checksums and all source videos before writing. It writes exact UTF-8 text bytes, including existing newlines. It does not overwrite conflicting files. Existing matching files are accepted. Missing or different source videos produce a JSON error report on stdout and exit code 2. Conflicting or missing reconstructed outputs in verification mode produce exit code 3. Original input videos remain untouched.
|
| 60 |
+
|
| 61 |
+
Use `--video-mode copy` if symlinks are unavailable. This copies video bytes into both video layouts and therefore uses additional disk space. Default symlinks point to the supplied local public-data root; moving that root later requires rebuilding them.
|
| 62 |
+
|
| 63 |
+
Verify the restored assets:
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
python RoboSteer-Preprocessing/level3/scripts/materialize_level3.py \
|
| 67 |
+
--public-root /data/public \
|
| 68 |
+
--output-root ./restored_level3 \
|
| 69 |
+
--verify-only
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Verification checks all expected entries; it does not remove or reject unrelated extra files. It does not run GEM or evaluate video decoding or instruction quality.
|
| 73 |
+
|
| 74 |
+
## Read the tables directly
|
| 75 |
+
|
| 76 |
+
```python
|
| 77 |
+
import pyarrow.parquet as pq
|
| 78 |
+
|
| 79 |
+
instructions = pq.read_table(
|
| 80 |
+
"RoboSteer-Preprocessing/level3/text_audio_instructions/data.parquet"
|
| 81 |
+
).to_pylist()
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
- Instructions: `item_id`, `task_id`, `order`, `source_modality`, `file_name`, `text`, `sha256`.
|
| 85 |
+
- Videos: `item_id`, `task_id`, `order`, `file_name`, `source_relpath`, `source_size`, `source_sha256`.
|
| 86 |
+
- GEM items: `task_id`, `item_id`, `order`, `file_name`, `kind`, `sha256`, `source_relpath` (null for text). Text is joined by `item_id`; optional overrides take precedence only for GEM reconstruction.
|
| 87 |
+
|
| 88 |
+
`file_name` is relative to its reconstructed asset directory. Media paths are relative to `--public-root`, never to the HF cache. The video table contains references, not embedded `Video` objects; viewing it on Hugging Face does not make external videos playable.
|
| 89 |
+
|
| 90 |
+
## Validation and provenance
|
| 91 |
+
|
| 92 |
+
The text was exported from the existing Level3 preprocessing outputs. Video references were taken from the original symlink targets, and the task/order layout from the actual GEM input directories. Text and video integrity are recorded as SHA-256; no historical processing `status` values were reused as quality labels.
|
| 93 |
+
|
| 94 |
+
See `release_manifest.json`, `validation.json` and `SHA256SUMS`. The reconstruction utility requires Python 3.9+ and pyarrow. The release does not include Qwen/Whisper/GEM models, logs, server credentials, or raw absolute server paths. Dataset terms and upstream media conditions should be consulted at the repository and source-data level.
|
level3/SHA256SUMS
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
e714770f36f1e3e961d249ab8d444ec974662ad14a23afb8158f658bc958e637 README.md
|
| 2 |
+
b2b23339bf9e2046f36c38e71442d14964cbd7ce812458b95c565547a697574c interleaved_input_list_for_GEM/README.md
|
| 3 |
+
8f4222a67e2f2cdefbdadb3f9ed18dd296835e969e1823a693ed48edea6c2eb9 interleaved_input_list_for_GEM/items.parquet
|
| 4 |
+
25847789e2be0271d91f247dc161a765259d421e04734dba8b65f408f133e826 release_manifest.json
|
| 5 |
+
6c302570f29b760392f9b259e02730ecfbe9b6001d64671ce211197c50e79e11 scripts/materialize_level3.py
|
| 6 |
+
c0f1fcbc3362a74d11afefb0508168fd729150023c101bd4221de26afb331f1f text_audio_instructions/README.md
|
| 7 |
+
1771747ae54f8c1e19e9973e5971bfe3f89293d63e6983d3a320ccdb562e7605 text_audio_instructions/data.parquet
|
| 8 |
+
7816e8cd76f178e9b3b37bca47f3a7931c37610e8c53316539a9f2720063907a validation.json
|
| 9 |
+
0d6c9f78ba8b73604e7d1c979f16b67069bd15d165308d0b58d432a17c6b3e2a video_symlinks/README.md
|
| 10 |
+
dbc91ee09dbf426c3a2b5998f25bed82039df408e639a051d8172e49a2bb06a7 video_symlinks/data.parquet
|
level3/interleaved_input_list_for_GEM/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# interleaved_input_list_for_GEM
|
| 2 |
+
|
| 3 |
+
See [Level3 release guide](../README.md) for the schema and reconstruction commands. This directory stores portable tables; use the reconstruction script to restore the original file layout.
|
level3/interleaved_input_list_for_GEM/items.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f4222a67e2f2cdefbdadb3f9ed18dd296835e969e1823a693ed48edea6c2eb9
|
| 3 |
+
size 1610025
|
level3/release_manifest.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "1.0",
|
| 3 |
+
"tasks": 7764,
|
| 4 |
+
"instructions": 17575,
|
| 5 |
+
"videos": 8475,
|
| 6 |
+
"gem_items": 26050,
|
| 7 |
+
"gem_texts": 17575,
|
| 8 |
+
"gem_text_mismatches": 0,
|
| 9 |
+
"mismatch_item_ids": [],
|
| 10 |
+
"images_included": false,
|
| 11 |
+
"audio_transcripts_included": false,
|
| 12 |
+
"video_bytes_included": false,
|
| 13 |
+
"public_root_layout": "Data_Processed/Level3/Video_Slices/",
|
| 14 |
+
"video_identity": "source_size + source_sha256",
|
| 15 |
+
"parquet_roundtrip": "passed",
|
| 16 |
+
"source_data_modified": false
|
| 17 |
+
}
|
level3/scripts/materialize_level3.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Restore or verify the three released Level3 assets. Requires pyarrow."""
|
| 3 |
+
import argparse
|
| 4 |
+
import hashlib
|
| 5 |
+
import json
|
| 6 |
+
import os
|
| 7 |
+
import shutil
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
import pyarrow.parquet as pq
|
| 10 |
+
|
| 11 |
+
def sha(path):
|
| 12 |
+
h=hashlib.sha256()
|
| 13 |
+
with path.open('rb') as f:
|
| 14 |
+
for b in iter(lambda:f.read(4*1024*1024),b''):h.update(b)
|
| 15 |
+
return h.hexdigest()
|
| 16 |
+
|
| 17 |
+
def under(root, relative):
|
| 18 |
+
p=Path(relative)
|
| 19 |
+
if p.is_absolute() or '..' in p.parts:raise ValueError('Unsafe relative path: '+str(p))
|
| 20 |
+
return root/p
|
| 21 |
+
|
| 22 |
+
def main():
|
| 23 |
+
p=argparse.ArgumentParser(description=__doc__)
|
| 24 |
+
p.add_argument('--release-root',type=Path,default=Path(__file__).resolve().parents[1])
|
| 25 |
+
p.add_argument('--public-root',type=Path,required=True,help='Directory containing Data_Processed/Level3/Video_Slices')
|
| 26 |
+
p.add_argument('--output-root',type=Path,required=True)
|
| 27 |
+
p.add_argument('--video-mode',choices=['symlink','copy'],default='symlink')
|
| 28 |
+
p.add_argument('--verify-only',action='store_true')
|
| 29 |
+
a=p.parse_args();r=a.release_root.resolve();out=a.output_root.resolve();public=a.public_root.resolve()
|
| 30 |
+
for line in (r/'SHA256SUMS').read_text().splitlines():
|
| 31 |
+
expected,name=line.split(' ',1)
|
| 32 |
+
if sha(under(r,name))!=expected:raise SystemExit('Release checksum mismatch: '+name)
|
| 33 |
+
texts=pq.read_table(r/'text_audio_instructions/data.parquet').to_pylist()
|
| 34 |
+
videos=pq.read_table(r/'video_symlinks/data.parquet').to_pylist()
|
| 35 |
+
items=pq.read_table(r/'interleaved_input_list_for_GEM/items.parquet').to_pylist()
|
| 36 |
+
source_text={x['item_id']:x['text'].encode('utf-8') for x in texts}
|
| 37 |
+
gemtext=dict(source_text)
|
| 38 |
+
overrides=r/'interleaved_input_list_for_GEM/text_overrides.parquet'
|
| 39 |
+
if overrides.exists():gemtext.update({x['item_id']:x['text'].encode('utf-8') for x in pq.read_table(overrides).to_pylist()})
|
| 40 |
+
video_by_id={x['item_id']:x for x in videos};bad=[]
|
| 41 |
+
for x in videos:
|
| 42 |
+
path=under(public,x['source_relpath'])
|
| 43 |
+
if not path.is_file():bad.append({'item_id':x['item_id'],'reason':'missing','path':x['source_relpath']})
|
| 44 |
+
elif path.stat().st_size!=x['source_size'] or sha(path)!=x['source_sha256']:
|
| 45 |
+
bad.append({'item_id':x['item_id'],'reason':'size_or_sha256_mismatch','path':x['source_relpath']})
|
| 46 |
+
if bad:
|
| 47 |
+
print(json.dumps({'ok':False,'invalid_source_videos':bad},ensure_ascii=False,indent=2))
|
| 48 |
+
raise SystemExit(2)
|
| 49 |
+
# Complete preflight before creating output. Never overwrite different existing content.
|
| 50 |
+
plans=[]
|
| 51 |
+
for x in texts:
|
| 52 |
+
b=source_text[x['item_id']]
|
| 53 |
+
if hashlib.sha256(b).hexdigest()!=x['sha256']:raise ValueError('Text checksum mismatch')
|
| 54 |
+
plans.append((under(out/'text_audio_instructions',x['file_name']),b,None))
|
| 55 |
+
for x in videos:plans.append((under(out/'video_symlinks',x['file_name']),None,under(public,x['source_relpath'])))
|
| 56 |
+
for x in items:
|
| 57 |
+
dest=under(out/'interleaved_input_list_for_GEM',x['file_name'])
|
| 58 |
+
if x['kind']=='text':
|
| 59 |
+
b=gemtext[x['item_id']]
|
| 60 |
+
if hashlib.sha256(b).hexdigest()!=x['sha256']:raise ValueError('GEM text checksum mismatch')
|
| 61 |
+
plans.append((dest,b,None))
|
| 62 |
+
else:
|
| 63 |
+
v=video_by_id[x['item_id']]
|
| 64 |
+
if v['source_relpath']!=x['source_relpath'] or v['source_sha256']!=x['sha256']:raise ValueError('Video reference mismatch')
|
| 65 |
+
plans.append((dest,None,under(public,v['source_relpath'])))
|
| 66 |
+
failures=[]
|
| 67 |
+
for dest,b,source in plans:
|
| 68 |
+
if dest.exists() or dest.is_symlink():
|
| 69 |
+
valid=(not dest.is_symlink() and dest.is_file() and dest.read_bytes()==b) if b is not None else ((dest.is_symlink() and dest.resolve()==source.resolve() and dest.is_file()) or (not dest.is_symlink() and dest.is_file() and sha(dest)==sha(source)))
|
| 70 |
+
if not valid:failures.append(str(dest.relative_to(out)))
|
| 71 |
+
elif a.verify_only:failures.append(str(dest.relative_to(out)))
|
| 72 |
+
# Existing symlink parents must not route output outside output-root.
|
| 73 |
+
if out not in dest.parent.resolve().parents and dest.parent.resolve()!=out:raise ValueError('Output parent escapes output-root')
|
| 74 |
+
if failures:
|
| 75 |
+
print(json.dumps({'ok':False,'missing_or_conflicting_outputs':failures},indent=2));raise SystemExit(3)
|
| 76 |
+
if not a.verify_only:
|
| 77 |
+
for dest,b,source in plans:
|
| 78 |
+
if dest.exists() or dest.is_symlink():continue
|
| 79 |
+
dest.parent.mkdir(parents=True,exist_ok=True)
|
| 80 |
+
if b is not None:
|
| 81 |
+
with dest.open('xb') as f:f.write(b)
|
| 82 |
+
elif a.video_mode=='copy':shutil.copyfile(source,dest)
|
| 83 |
+
else:dest.symlink_to(source)
|
| 84 |
+
print(json.dumps({'ok':True,'mode':'verify' if a.verify_only else 'materialize','tasks':len({x['task_id'] for x in items}),'grouped_texts':len(texts),'videos':len(videos),'gem_items':len(items),'expected_output_entries':len(plans),'source_video_sha256':'passed'},indent=2))
|
| 85 |
+
|
| 86 |
+
if __name__=='__main__':main()
|
level3/text_audio_instructions/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# text_audio_instructions
|
| 2 |
+
|
| 3 |
+
See [Level3 release guide](../README.md) for the schema and reconstruction commands. This directory stores portable tables; use the reconstruction script to restore the original file layout.
|
level3/text_audio_instructions/data.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1771747ae54f8c1e19e9973e5971bfe3f89293d63e6983d3a320ccdb562e7605
|
| 3 |
+
size 1840505
|
level3/validation.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"checked_date": "2026-09-17",
|
| 3 |
+
"full_original_layout_verification": {
|
| 4 |
+
"ok": true,
|
| 5 |
+
"mode": "verify",
|
| 6 |
+
"tasks": 7764,
|
| 7 |
+
"grouped_texts": 17575,
|
| 8 |
+
"videos": 8475,
|
| 9 |
+
"gem_items": 26050,
|
| 10 |
+
"expected_output_entries": 52100,
|
| 11 |
+
"source_video_sha256": "passed"
|
| 12 |
+
},
|
| 13 |
+
"parquet_roundtrip": "passed",
|
| 14 |
+
"gem_text_vs_grouped_text": "17575 files byte-identical",
|
| 15 |
+
"reconstruction_functional_tests": [
|
| 16 |
+
"materialize fixture",
|
| 17 |
+
"verify fixture",
|
| 18 |
+
"preserve skipped order indices",
|
| 19 |
+
"reject changed source bytes",
|
| 20 |
+
"reject output conflict"
|
| 21 |
+
],
|
| 22 |
+
"private_server_path_audit": "passed",
|
| 23 |
+
"actual_media_bytes_published": false,
|
| 24 |
+
"video_decoding_or_motion_quality_checked": false
|
| 25 |
+
}
|
level3/video_symlinks/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# video_symlinks
|
| 2 |
+
|
| 3 |
+
See [Level3 release guide](../README.md) for the schema and reconstruction commands. This directory stores portable tables; use the reconstruction script to restore the original file layout.
|
level3/video_symlinks/data.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dbc91ee09dbf426c3a2b5998f25bed82039df408e639a051d8172e49a2bb06a7
|
| 3 |
+
size 878507
|