mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-22 12:09:42 +00:00
chore(root): fixing root semantics in convert_dataset script (#3073)
* fix(root): fixing root semantincs in convert_dataset script * fix(\): fixing command syntax in dataset conversion script Signed-off-by: Caroline Pascal <caroline8.pascal@gmail.com> --------- Signed-off-by: Caroline Pascal <caroline8.pascal@gmail.com>
This commit is contained in:
@@ -36,8 +36,11 @@ Convert a local dataset (works in place):
|
|||||||
```bash
|
```bash
|
||||||
python src/lerobot/datasets/v30/convert_dataset_v21_to_v30.py \
|
python src/lerobot/datasets/v30/convert_dataset_v21_to_v30.py \
|
||||||
--repo-id=lerobot/pusht \
|
--repo-id=lerobot/pusht \
|
||||||
--root=/path/to/local/dataset/directory
|
--root=/path/to/local/dataset/directory \
|
||||||
--push-to-hub=false
|
--push-to-hub=false
|
||||||
|
|
||||||
|
N.B. Path semantics (v2): --root is the exact dataset folder containing
|
||||||
|
meta/, data/, videos/. When omitted, defaults to $HF_LEROBOT_HOME/{repo_id}.
|
||||||
```
|
```
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -469,7 +472,7 @@ def convert_dataset(
|
|||||||
|
|
||||||
# Set root based on whether local dataset path is provided
|
# Set root based on whether local dataset path is provided
|
||||||
use_local_dataset = False
|
use_local_dataset = False
|
||||||
root = HF_LEROBOT_HOME / repo_id if root is None else Path(root) / repo_id
|
root = HF_LEROBOT_HOME / repo_id if root is None else Path(root)
|
||||||
if root.exists():
|
if root.exists():
|
||||||
validate_local_dataset_version(root)
|
validate_local_dataset_version(root)
|
||||||
use_local_dataset = True
|
use_local_dataset = True
|
||||||
@@ -553,7 +556,7 @@ if __name__ == "__main__":
|
|||||||
"--root",
|
"--root",
|
||||||
type=str,
|
type=str,
|
||||||
default=None,
|
default=None,
|
||||||
help="Local directory to use for downloading/writing the dataset.",
|
help="Local directory to use for downloading/writing the dataset. Defaults to $HF_LEROBOT_HOME/repo_id.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--push-to-hub",
|
"--push-to-hub",
|
||||||
|
|||||||
Reference in New Issue
Block a user