Checking and training
How to check a recorded dataset before training, leave out episodes you do not want, and train with LeRobot.
Checking a dataset
roboloom check-dataset [robot] checks a dataset by reading it only (CLI). Name a robot (with --with / --without as recorded) or a dataset directory.
uv run roboloom check-dataset --with policy
| Output | Content |
|---|---|
| Summary | Episodes, rows, fps, robot, the roboloom version that recorded it, file counts; with episode records, the verdict counts (labels: 7 success, 3 failure, ...) |
problems |
What is broken: unreadable files, counts that disagree between info.json and the episode metadata, episode indices with gaps, missing videos and videos that do not match their rows, a half-written episode |
notes |
What to know before training: the share of rows that are 0, per *.valid column; the share of rows whose action is all zeros (recorded before rows without a command kept the held target) |
- With
problems, the command exits with code 1. - When a save was interrupted and a half-written episode is left,
--recoverremoves it before checking. Recording into the dataset again removes it too (What happens to a saved episode). - What
validmeans is in Validity flags; the values of rows that are 0 are in Missing data.
Leaving out bad episodes
The per-episode metrics (Episode records) tell which episodes to train on.
from roboloom.recording import episodes
records = episodes.read(".roboloom/rakuda2/datasets/rakuda2")
keep = [
index
for index, record in sorted(records.items())
if record.get("metrics", {}).get("action_valid_rate", 0) >= 0.9
]
print(keep)
Pass the indices to lerobot-train as --dataset.episodes, and it trains on those episodes only.
uv run lerobot-train \
--dataset.repo_id=local/rakuda2 \
--dataset.root=.roboloom/rakuda2/datasets/rakuda2 \
--dataset.episodes='[0, 1, 3, 4]' \
--policy.type=act --policy.device=cuda --policy.push_to_hub=false \
--trackio.enable=false \
--output_dir=outputs/train/act_rakuda2
--dataset.episodesselects rows only. The normalization statistics stay those of the whole dataset (meta/stats.json). When the left-out episodes hold outlying values, make a dataset without them instead, as below.- LeRobot's
lerobot-edit-dataset --operation.type delete_episodes --operation.episode_indices "[2, 5]"writes a new dataset without those episodes and aggregates the statistics of the kept ones again (--root,--new_rootand--new_repo_idgive the places). The episodes are renumbered from 0. roboloom's files (meta/roboloom.json,meta/roboloom_episodes.jsonl) are not copied to the new dataset. - To recompute the statistics of a whole dataset, use
lerobot-edit-dataset --operation.type recompute_stats. - Both need
lerobot[dataset], which--extra train(lerobot[training]) installs. roboloom has not checked these tools; see LeRobot's documentation for their use. - The
--dataset.*options oflerobot-trainhave no setting that selects rows byaction.validor the like. To select rows, readLeRobotDataset(...).hf_datasetand drop them yourself (Missing data).
Training with LeRobot
A dataset roboloom recorded (LeRobotDataset v3.0) trains with lerobot-train as it is. The extras, the command and how to run the trained checkpoint are in Training with LeRobot.
--dataset.repo_idis the configuration'srepo_id;--dataset.rootis itsoutput, from the robot's directory.lerobot-traindoes not look at the*.validcolumns. In rows whoseaction.validis 0,actionholds the target each follower keeps.- Before training on a GPU, check with
labstatusthat a GPU is free. - An example of training your own model is in From a recording to your own model.