Closed kandeng closed 3 months ago
Try this:
in terminal
export HF_DATASETS_CACHE="/path/to/your/directory"
with python
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset
LeRobotDataset("lerobot/aloha_sim_insertion_human")
in terminal
ls /path/to/your/directory
Awesome, it works! @Cadene
$ python3 load_lerobot_dataset.py
LeRobot 'lerobot/aloha_sim_insertion_human'.
Downloading readme: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 605/605 [00:00<00:00, 1.04MB/s]
Downloading data: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 3.08M/3.08M [00:02<00:00, 1.27MB/s]
Generating train split: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 25000/25000 [00:00<00:00, 828697.65 examples/s]
Fetching 56 files: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 56/56 [00:00<00:00, 11919.87it/s]
$ tree .
.
βββ _Users_dengkan_Projects_lerobot-main_datasets_lerobot___aloha_sim_insertion_human_default_0.0.0_4bb2ef91f2cc0a4ea458fd2876cf4092e4f9720b.lock
βββ aloha_sim_insertion_human.zip
βββ downloads
βΒ Β βββ a53e2381f1f504dc8f402011129b9dda57584c1b23e2c6f1725bccaafb13e276
βΒ Β βββ a53e2381f1f504dc8f402011129b9dda57584c1b23e2c6f1725bccaafb13e276.json
βΒ Β βββ a53e2381f1f504dc8f402011129b9dda57584c1b23e2c6f1725bccaafb13e276.lock
βΒ Β βββ e07d4da387d815a7a6ae1eca78f96218193e77783496b8f65ab14e4b78fcd467.df4eab1c0af39638a2e1f5bbe094f472e627e7f2196d14230568c46e02bc6af0
βΒ Β βββ e07d4da387d815a7a6ae1eca78f96218193e77783496b8f65ab14e4b78fcd467.df4eab1c0af39638a2e1f5bbe094f472e627e7f2196d14230568c46e02bc6af0.json
βΒ Β βββ e07d4da387d815a7a6ae1eca78f96218193e77783496b8f65ab14e4b78fcd467.df4eab1c0af39638a2e1f5bbe094f472e627e7f2196d14230568c46e02bc6af0.lock
βββ lerobot___aloha_sim_insertion_human
βΒ Β βββ default
βΒ Β βββ 0.0.0
βΒ Β βββ 4bb2ef91f2cc0a4ea458fd2876cf4092e4f9720b
βΒ Β βΒ Β βββ aloha_sim_insertion_human-train.arrow
βΒ Β βΒ Β βββ dataset_info.json
βΒ Β βββ 4bb2ef91f2cc0a4ea458fd2876cf4092e4f9720b.incomplete_info.lock
βΒ Β βββ 4bb2ef91f2cc0a4ea458fd2876cf4092e4f9720b_builder.lock
βββ load_lerobot_dataset.py
βββ rotten_tomatoes
βββ data-00000-of-00001.arrow
βββ dataset_dict.json
βββ dataset_info.json
βββ state.json
βββ test
βΒ Β βββ data-00000-of-00001.arrow
βΒ Β βββ dataset_info.json
βΒ Β βββ state.json
βββ train
βΒ Β βββ data-00000-of-00001.arrow
βΒ Β βββ dataset_info.json
βΒ Β βββ state.json
βββ validation
βββ data-00000-of-00001.arrow
βββ dataset_info.json
βββ state.json
10 directories, 26 files
My code is very simple,
# load_lerobot_dataset.py
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset
repo_id = "lerobot/aloha_sim_insertion_human"
print(f"\n LeRobot '{repo_id}'.\n\n")
dataset = LeRobotDataset(repo_id)
dataset_file = f"/Users/dengkan/Projects/lerobot-main/datasets/aloha_sim_insertion_human.zip"
torch.save(dataset, dataset_file)
Remi's solution works!
Many thanks for help.
System Info
Information
Reproduction
Expected behavior
Should save the downloaded dataset, into a local file without bugs.