LeRobot adapter
Coming soon
This page is a placeholder for an upcoming topic — shipping in `robotrace 0.2`. The URL is stable, so any links you write today won't rot when the real page lands. For now, `log_episode` with file paths covers the closest live topic.
What it'll do
Walk a Hugging Face LeRobot dataset and create one RoboTrace episode per trajectory, with the right reproducibility fields populated from the dataset metadata. Targeted shape:
from robotrace.adapters import lerobot
lerobot.ingest(
dataset="lerobot/aloha_static_cups_open",
policy_version="aloha-v1",
env_version="aloha-cell-1",
# Optional: only ingest a subset
episode_indices=range(0, 50),
)Each LeRobotDataset episode becomes a RoboTrace episode under the
hood, calling log_episode with the per-episode
video, sensors, and actions extracted automatically.
Until it lands
The SDK already accepts file paths. Loop over the dataset manually
and call log_episode per trajectory:
import robotrace as rt
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset
ds = LeRobotDataset("lerobot/aloha_static_cups_open")
for i in range(ds.num_episodes):
rt.log_episode(
name=f"aloha_static_cups_open #{i}",
source="replay",
policy_version="aloha-v1",
env_version="aloha-cell-1",
# Save the per-episode tensors to disk first, then pass paths.
video=f"/tmp/ep{i}.mp4",
sensors=f"/tmp/ep{i}_obs.npz",
actions=f"/tmp/ep{i}_actions.npz",
metadata={"lerobot_episode_index": i, "lerobot_dataset": ds.repo_id},
)Inelegant — that's why the adapter is on the roadmap.