Skip to content
Closed
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b301e35
fix(docs): Remove --local-files-only from examples
tc-huang Apr 29, 2025
808464c
Merge branch 'huggingface:main' into fix/local-files-only-arg-in-md
tc-huang Apr 29, 2025
f904479
Merge branch 'huggingface:main' into fix/local-files-only-arg-in-md
tc-huang Apr 30, 2025
9038d8c
fix(dataset): Append repo_id to root path for local dataset
tc-huang Apr 30, 2025
4ed34c7
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang May 2, 2025
b03067b
fix(dataset, tests): Update root path in dataset metadata and test
tc-huang May 3, 2025
da0f958
fix(tests): Update root paths in `test_control_robot.py`
tc-huang May 3, 2025
33a7420
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang May 7, 2025
f913fdf
fix(dataset): Update root path handling in `lerobot_dataset.py`
tc-huang May 8, 2025
35ea4ed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 8, 2025
d5b112b
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang May 9, 2025
af2b250
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang May 10, 2025
8fb30ff
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang May 29, 2025
847de0c
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jun 4, 2025
0e54b2c
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jun 13, 2025
e71dff8
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jun 14, 2025
c21dab0
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jun 14, 2025
04fb2a7
Merge branch 'huggingface:main' into fix/local-files-only-arg-in-md
tc-huang Jun 15, 2025
e200a97
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jun 15, 2025
4b2db07
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jun 25, 2025
b92cb68
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jun 26, 2025
ef57da2
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Jul 29, 2025
1217729
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 29, 2025
76d23ea
Merge branch 'huggingface:main' into fix/local-files-only-arg-in-md
tc-huang Aug 1, 2025
17a4b95
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Aug 2, 2025
4f804db
Merge branch 'huggingface:main' into fix/local-files-only-arg-in-md
tc-huang Aug 4, 2025
bc0f932
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Aug 5, 2025
68b48e3
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Aug 7, 2025
5759270
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Aug 31, 2025
5a5bf81
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Sep 14, 2025
888e6ae
Merge branch 'main' into fix/local-files-only-arg-in-md
tc-huang Sep 27, 2025
185b5e5
Merge branch 'main' into pr/tc-huang/1057
tc-huang Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lerobot/datasets/lerobot_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def create(
"""Creates metadata for a LeRobotDataset."""
obj = cls.__new__(cls)
obj.repo_id = repo_id
obj.root = Path(root) if root is not None else HF_LEROBOT_HOME / repo_id
obj.root = Path(root) / repo_id if root is not None else HF_LEROBOT_HOME / repo_id
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as line 89: when repo_id contains a forward slash (e.g., 'lerobot/pusht'), Path(root) / repo_id will create nested directories instead of treating the repo_id as a single directory name. This inconsistency could cause datasets to be stored/looked up in incorrect locations.

Suggested change
obj.root = Path(root) / repo_id if root is not None else HF_LEROBOT_HOME / repo_id
sanitized_repo_id = repo_id.replace("/", "_")
obj.root = Path(root) / sanitized_repo_id if root is not None else HF_LEROBOT_HOME / sanitized_repo_id

Copilot uses AI. Check for mistakes.

obj.root.mkdir(parents=True, exist_ok=False)

Expand Down Expand Up @@ -690,7 +690,7 @@ def __init__(
if vcodec not in VALID_VIDEO_CODECS:
raise ValueError(f"Invalid vcodec '{vcodec}'. Must be one of: {sorted(VALID_VIDEO_CODECS)}")
self.repo_id = repo_id
self.root = Path(root) if root else HF_LEROBOT_HOME / repo_id
self.root = Path(root) / repo_id if root else HF_LEROBOT_HOME / repo_id
Comment on lines 692 to +693
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same path concatenation issue: Path(root) / repo_id will create nested directories when repo_id contains forward slashes. This creates inconsistency with how paths are expected to be structured based on the PR description which mentions datasets should be at ./my_local_data_dir/lerobot/pusht.

Copilot uses AI. Check for mistakes.
self.image_transforms = image_transforms
self.delta_timestamps = delta_timestamps
self.episodes = episodes
Expand All @@ -713,7 +713,7 @@ def __init__(

# Load metadata
self.meta = LeRobotDatasetMetadata(
self.repo_id, self.root, self.revision, force_cache_sync=force_cache_sync
self.repo_id, root, self.revision, force_cache_sync=force_cache_sync
)

# Track dataset state for efficient incremental writing
Expand Down