From 9320de656d6025320c99c4da32a88433828e8c2c Mon Sep 17 00:00:00 2001 From: CarolinePascal Date: Thu, 26 Feb 2026 18:22:38 +0100 Subject: [PATCH 1/3] chore(docstrings): fixing deprecated `root` argument docstrings in LeRobotDataset class --- src/lerobot/datasets/lerobot_dataset.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lerobot/datasets/lerobot_dataset.py b/src/lerobot/datasets/lerobot_dataset.py index bb526740ee..76d44de077 100644 --- a/src/lerobot/datasets/lerobot_dataset.py +++ b/src/lerobot/datasets/lerobot_dataset.py @@ -664,11 +664,11 @@ def __init__( for the README). Args: - repo_id (str): This is the repo id that will be used to fetch the dataset. Locally, the dataset - will be stored under root/repo_id. - root (Path | None, optional): Local directory to use for downloading/writing files. You can also - set the HF_LEROBOT_HOME environment variable to point to a different location. Defaults to - '~/.cache/huggingface/lerobot'. + repo_id (str): This is the repo id that will be used to fetch the dataset. + root (Path | None, optional): Local directory where the dataset will be downloaded and + stored. If set, all dataset files will be stored directly under this path. If not set, the + dataset files will be stored under $HF_LEROBOT_HOME/repo_id (configurable via the + HF_LEROBOT_HOME environment variable). episodes (list[int] | None, optional): If specified, this will only load episodes specified by their episode_index in this list. Defaults to None. image_transforms (Callable | None, optional): You can pass standard v2 image transforms from From 3448e1778386bc9b35ff939e82c82edbed3db4ef Mon Sep 17 00:00:00 2001 From: CarolinePascal Date: Thu, 26 Feb 2026 18:49:25 +0100 Subject: [PATCH 2/3] chore(draccus): updating draccus CLI help --- examples/backward_compatibility/replay.py | 2 +- src/lerobot/configs/default.py | 2 +- src/lerobot/scripts/lerobot_dataset_viz.py | 7 ++++++- src/lerobot/scripts/lerobot_record.py | 2 +- src/lerobot/scripts/lerobot_replay.py | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/backward_compatibility/replay.py b/examples/backward_compatibility/replay.py index f7c47bec5c..13fdfd5f51 100644 --- a/examples/backward_compatibility/replay.py +++ b/examples/backward_compatibility/replay.py @@ -57,7 +57,7 @@ class DatasetReplayConfig: repo_id: str # Episode to replay. episode: int - # Root directory where the dataset will be stored (e.g. 'dataset/path'). + # Root directory where the dataset will be stored (e.g. 'dataset/path'). If None, defaults to $HF_LEROBOT_HOME/repo_id. root: str | Path | None = None # Limit the frames per second. By default, uses the policy fps. fps: int = 30 diff --git a/src/lerobot/configs/default.py b/src/lerobot/configs/default.py index f613b52518..dcb0cbd543 100644 --- a/src/lerobot/configs/default.py +++ b/src/lerobot/configs/default.py @@ -27,7 +27,7 @@ class DatasetConfig: # "dataset_index" into the returned item. The index mapping is made according to the order in which the # datasets are provided. repo_id: str - # Root directory where the dataset will be stored (e.g. 'dataset/path'). + # Root directory where the dataset will be stored (e.g. 'dataset/path'). If None, defaults to $HF_LEROBOT_HOME/repo_id. root: str | None = None episodes: list[int] | None = None image_transforms: ImageTransformsConfig = field(default_factory=ImageTransformsConfig) diff --git a/src/lerobot/scripts/lerobot_dataset_viz.py b/src/lerobot/scripts/lerobot_dataset_viz.py index 29d64554f0..a71064f177 100644 --- a/src/lerobot/scripts/lerobot_dataset_viz.py +++ b/src/lerobot/scripts/lerobot_dataset_viz.py @@ -132,10 +132,15 @@ def visualize_dataset( logging.info("Logging to Rerun") + first_index = None for batch in tqdm.tqdm(dataloader, total=len(dataloader)): + if first_index is None: + first_index = batch["index"][0].item() # iterate over the batch + print(batch["index"]) + print(batch["index"] - first_index) for i in range(len(batch["index"])): - rr.set_time("frame_index", sequence=batch["frame_index"][i].item()) + rr.set_time("frame_index", sequence=batch["index"][i].item()) rr.set_time("timestamp", timestamp=batch["timestamp"][i].item()) # display each camera image diff --git a/src/lerobot/scripts/lerobot_record.py b/src/lerobot/scripts/lerobot_record.py index ec04975d4f..413e882feb 100644 --- a/src/lerobot/scripts/lerobot_record.py +++ b/src/lerobot/scripts/lerobot_record.py @@ -154,7 +154,7 @@ class DatasetRecordConfig: repo_id: str # A short but accurate description of the task performed during the recording (e.g. "Pick the Lego block and drop it in the box on the right.") single_task: str - # Root directory where the dataset will be stored (e.g. 'dataset/path'). + # Root directory where the dataset will be stored (e.g. 'dataset/path'). If None, defaults to $HF_LEROBOT_HOME/repo_id. root: str | Path | None = None # Limit the frames per second. fps: int = 30 diff --git a/src/lerobot/scripts/lerobot_replay.py b/src/lerobot/scripts/lerobot_replay.py index 8e2a394b9c..7c0b5b96b4 100644 --- a/src/lerobot/scripts/lerobot_replay.py +++ b/src/lerobot/scripts/lerobot_replay.py @@ -80,7 +80,7 @@ class DatasetReplayConfig: repo_id: str # Episode to replay. episode: int - # Root directory where the dataset will be stored (e.g. 'dataset/path'). + # Root directory where the dataset will be stored (e.g. 'dataset/path'). If None, defaults to $HF_LEROBOT_HOME/repo_id. root: str | Path | None = None # Limit the frames per second. By default, uses the policy fps. fps: int = 30 From a293eb2f97d8811bc7361b74772db58d5535b34b Mon Sep 17 00:00:00 2001 From: CarolinePascal Date: Fri, 27 Feb 2026 17:52:43 +0100 Subject: [PATCH 3/3] chore(revert): reverting changes in lerobot_dataset_viz.py --- src/lerobot/scripts/lerobot_dataset_viz.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lerobot/scripts/lerobot_dataset_viz.py b/src/lerobot/scripts/lerobot_dataset_viz.py index a71064f177..29d64554f0 100644 --- a/src/lerobot/scripts/lerobot_dataset_viz.py +++ b/src/lerobot/scripts/lerobot_dataset_viz.py @@ -132,15 +132,10 @@ def visualize_dataset( logging.info("Logging to Rerun") - first_index = None for batch in tqdm.tqdm(dataloader, total=len(dataloader)): - if first_index is None: - first_index = batch["index"][0].item() # iterate over the batch - print(batch["index"]) - print(batch["index"] - first_index) for i in range(len(batch["index"])): - rr.set_time("frame_index", sequence=batch["index"][i].item()) + rr.set_time("frame_index", sequence=batch["frame_index"][i].item()) rr.set_time("timestamp", timestamp=batch["timestamp"][i].item()) # display each camera image