-
Notifications
You must be signed in to change notification settings - Fork 4k
fix: update root/repo_id path in lerobot_dataset.py
#1057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b301e35
808464c
f904479
9038d8c
4ed34c7
b03067b
da0f958
33a7420
f913fdf
35ea4ed
d5b112b
af2b250
8fb30ff
847de0c
0e54b2c
e71dff8
c21dab0
04fb2a7
e200a97
4b2db07
b92cb68
ef57da2
1217729
76d23ea
17a4b95
4f804db
bc0f932
68b48e3
5759270
5a5bf81
888e6ae
185b5e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
| obj.root.mkdir(parents=True, exist_ok=False) | ||
|
|
||
|
|
@@ -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
|
||
| self.image_transforms = image_transforms | ||
| self.delta_timestamps = delta_timestamps | ||
| self.episodes = episodes | ||
|
|
@@ -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 | ||
|
|
||
There was a problem hiding this comment.
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_idcontains a forward slash (e.g., 'lerobot/pusht'),Path(root) / repo_idwill 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.