Skip to content

Commit e4f23cf

Browse files
committed
fix(examples): use HF_LEROBOT_HOME in Aloha→LeRobot converter
Salvage / completion of #508 by @jmcoholich — rebased to main. Libero/DROID examples already import HF_LEROBOT_HOME; aloha_real still referenced removed LEROBOT_HOME.
1 parent 15a9616 commit e4f23cf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/aloha_real/convert_aloha_data_to_lerobot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing import Literal
1111

1212
import h5py
13-
from lerobot.common.datasets.lerobot_dataset import LEROBOT_HOME
13+
from lerobot.common.datasets.lerobot_dataset import HF_LEROBOT_HOME
1414
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset
1515
from lerobot.common.datasets.push_dataset_to_hub._download_raw import download_raw
1616
import numpy as np
@@ -109,8 +109,8 @@ def create_empty_dataset(
109109
],
110110
}
111111

112-
if Path(LEROBOT_HOME / repo_id).exists():
113-
shutil.rmtree(LEROBOT_HOME / repo_id)
112+
if Path(HF_LEROBOT_HOME / repo_id).exists():
113+
shutil.rmtree(HF_LEROBOT_HOME / repo_id)
114114

115115
return LeRobotDataset.create(
116116
repo_id=repo_id,
@@ -238,8 +238,8 @@ def port_aloha(
238238
mode: Literal["video", "image"] = "image",
239239
dataset_config: DatasetConfig = DEFAULT_DATASET_CONFIG,
240240
):
241-
if (LEROBOT_HOME / repo_id).exists():
242-
shutil.rmtree(LEROBOT_HOME / repo_id)
241+
if (HF_LEROBOT_HOME / repo_id).exists():
242+
shutil.rmtree(HF_LEROBOT_HOME / repo_id)
243243

244244
if not raw_dir.exists():
245245
if raw_repo_id is None:

0 commit comments

Comments
 (0)