Loading...
Loading...
Ingest a LeRobot (HuggingFace) dataset into Rerun. Read when converting a LeRobot dataset to RRDs, splitting it into per-episode segments, or registering it on a Rerun catalog. Covers the built-in directory importer (log_file_from_path), the RrdReader + send_chunks per-episode split, and when to drop to ParquetReader for custom control.
npx skill4agent add rerun-io/rerun rerun-lerobotlog_file_from_pathrerun <dir>LeRobotReaderRrdReaderhuggingface_hubfrom huggingface_hub import snapshot_download
import rerun as rr
dataset_dir = snapshot_download(repo_id="rerun/so101-pick-and-place", repo_type="dataset", local_dir=dest)
with rr.RecordingStream("rerun_example_lerobot") as rec:
rec.save(str(combined_rrd))
rec.log_file_from_path(str(dataset_dir)) # the built-in importerepisode_1rr.RecordingStreamlog_file_from_pathRecordingStreamrr.logRrdReaderrerun-chunk-processingrecording_idRrdReaderreader = rr.experimental.RrdReader(str(combined_rrd))
for entry in reader.recordings():
store = reader.store(store=entry)
if not store.schema().entity_paths(): # skip the metadata-only root recording
continue
episode_id = zero_pad(entry.recording_id) # episode_1 -> episode_00001
with rr.RecordingStream("rerun_example_lerobot", recording_id=episode_id, send_properties=False) as rec:
rec.save(str(rrd_dir / f"{episode_id}.rrd"))
rec.send_chunks(store)episode_10episode_2recording_idsend_properties=Falsesend_chunksrecording_idreader.stream(store=entry).drop(...).lenses(...)collect().write_rrd(..., recording_id=episode_id)rerun-chunk-processingrerun-data-modelrecording_idlog_file_from_pathhttps://github.com/rerun-io/rerun/tree/main/examples/python/dataloaderprepare_dataset.pytrain.pyrerun.experimental.dataloader