Add available list of raw repo ids (#312)
This commit is contained in:
parent
471eab3d7e
commit
5ffcb48a9a
|
@ -31,6 +31,49 @@ from pathlib import Path
|
||||||
|
|
||||||
from huggingface_hub import snapshot_download
|
from huggingface_hub import snapshot_download
|
||||||
|
|
||||||
|
AVAILABLE_RAW_REPO_IDS = [
|
||||||
|
"cadene/pusht_image_raw",
|
||||||
|
"cadene/xarm_lift_medium_image_raw",
|
||||||
|
"cadene/xarm_lift_medium_replay_image_raw",
|
||||||
|
"cadene/xarm_push_medium_image_raw",
|
||||||
|
"cadene/xarm_push_medium_replay_image_raw",
|
||||||
|
"cadene/aloha_sim_insertion_human_image_raw",
|
||||||
|
"cadene/aloha_sim_insertion_scripted_image_raw",
|
||||||
|
"cadene/aloha_sim_transfer_cube_human_image_raw",
|
||||||
|
"cadene/aloha_sim_transfer_cube_scripted_image_raw",
|
||||||
|
"cadene/pusht_raw",
|
||||||
|
"cadene/xarm_lift_medium_raw",
|
||||||
|
"cadene/xarm_lift_medium_replay_raw",
|
||||||
|
"cadene/xarm_push_medium_raw",
|
||||||
|
"cadene/xarm_push_medium_replay_raw",
|
||||||
|
"cadene/aloha_sim_insertion_human_raw",
|
||||||
|
"cadene/aloha_sim_insertion_scripted_raw",
|
||||||
|
"cadene/aloha_sim_transfer_cube_human_raw",
|
||||||
|
"cadene/aloha_sim_transfer_cube_scripted_raw",
|
||||||
|
"cadene/aloha_mobile_cabinet_raw",
|
||||||
|
"cadene/aloha_mobile_chair_raw",
|
||||||
|
"cadene/aloha_mobile_elevator_raw",
|
||||||
|
"cadene/aloha_mobile_shrimp_raw",
|
||||||
|
"cadene/aloha_mobile_wash_pan_raw",
|
||||||
|
"cadene/aloha_mobile_wipe_wine_raw",
|
||||||
|
"cadene/aloha_static_battery_raw",
|
||||||
|
"cadene/aloha_static_candy_raw",
|
||||||
|
"cadene/aloha_static_coffee_raw",
|
||||||
|
"cadene/aloha_static_coffee_new_raw",
|
||||||
|
"cadene/aloha_static_cups_open_raw",
|
||||||
|
"cadene/aloha_static_fork_pick_up_raw",
|
||||||
|
"cadene/aloha_static_pingpong_test_raw",
|
||||||
|
"cadene/aloha_static_pro_pencil_raw",
|
||||||
|
"cadene/aloha_static_screw_driver_raw",
|
||||||
|
"cadene/aloha_static_tape_raw",
|
||||||
|
"cadene/aloha_static_thread_velcro_raw",
|
||||||
|
"cadene/aloha_static_towel_raw",
|
||||||
|
"cadene/aloha_static_vinh_cup_raw",
|
||||||
|
"cadene/aloha_static_vinh_cup_left_raw",
|
||||||
|
"cadene/aloha_static_ziploc_slide_raw",
|
||||||
|
"cadene/umi_cup_in_the_wild_raw",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def download_raw(raw_dir: Path, repo_id: str):
|
def download_raw(raw_dir: Path, repo_id: str):
|
||||||
# Check repo_id is well formated
|
# Check repo_id is well formated
|
||||||
|
@ -62,55 +105,15 @@ def download_raw(raw_dir: Path, repo_id: str):
|
||||||
|
|
||||||
def download_all_raw_datasets():
|
def download_all_raw_datasets():
|
||||||
data_dir = Path("data")
|
data_dir = Path("data")
|
||||||
repo_ids = [
|
for repo_id in AVAILABLE_RAW_REPO_IDS:
|
||||||
"cadene/pusht_image_raw",
|
|
||||||
"cadene/xarm_lift_medium_image_raw",
|
|
||||||
"cadene/xarm_lift_medium_replay_image_raw",
|
|
||||||
"cadene/xarm_push_medium_image_raw",
|
|
||||||
"cadene/xarm_push_medium_replay_image_raw",
|
|
||||||
"cadene/aloha_sim_insertion_human_image_raw",
|
|
||||||
"cadene/aloha_sim_insertion_scripted_image_raw",
|
|
||||||
"cadene/aloha_sim_transfer_cube_human_image_raw",
|
|
||||||
"cadene/aloha_sim_transfer_cube_scripted_image_raw",
|
|
||||||
"cadene/pusht_raw",
|
|
||||||
"cadene/xarm_lift_medium_raw",
|
|
||||||
"cadene/xarm_lift_medium_replay_raw",
|
|
||||||
"cadene/xarm_push_medium_raw",
|
|
||||||
"cadene/xarm_push_medium_replay_raw",
|
|
||||||
"cadene/aloha_sim_insertion_human_raw",
|
|
||||||
"cadene/aloha_sim_insertion_scripted_raw",
|
|
||||||
"cadene/aloha_sim_transfer_cube_human_raw",
|
|
||||||
"cadene/aloha_sim_transfer_cube_scripted_raw",
|
|
||||||
"cadene/aloha_mobile_cabinet_raw",
|
|
||||||
"cadene/aloha_mobile_chair_raw",
|
|
||||||
"cadene/aloha_mobile_elevator_raw",
|
|
||||||
"cadene/aloha_mobile_shrimp_raw",
|
|
||||||
"cadene/aloha_mobile_wash_pan_raw",
|
|
||||||
"cadene/aloha_mobile_wipe_wine_raw",
|
|
||||||
"cadene/aloha_static_battery_raw",
|
|
||||||
"cadene/aloha_static_candy_raw",
|
|
||||||
"cadene/aloha_static_coffee_raw",
|
|
||||||
"cadene/aloha_static_coffee_new_raw",
|
|
||||||
"cadene/aloha_static_cups_open_raw",
|
|
||||||
"cadene/aloha_static_fork_pick_up_raw",
|
|
||||||
"cadene/aloha_static_pingpong_test_raw",
|
|
||||||
"cadene/aloha_static_pro_pencil_raw",
|
|
||||||
"cadene/aloha_static_screw_driver_raw",
|
|
||||||
"cadene/aloha_static_tape_raw",
|
|
||||||
"cadene/aloha_static_thread_velcro_raw",
|
|
||||||
"cadene/aloha_static_towel_raw",
|
|
||||||
"cadene/aloha_static_vinh_cup_raw",
|
|
||||||
"cadene/aloha_static_vinh_cup_left_raw",
|
|
||||||
"cadene/aloha_static_ziploc_slide_raw",
|
|
||||||
"cadene/umi_cup_in_the_wild_raw",
|
|
||||||
]
|
|
||||||
for repo_id in repo_ids:
|
|
||||||
raw_dir = data_dir / repo_id
|
raw_dir = data_dir / repo_id
|
||||||
download_raw(raw_dir, repo_id)
|
download_raw(raw_dir, repo_id)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser(
|
||||||
|
description=f"A script to download raw datasets from Hugging Face hub to a local directory. Here is a non exhaustive list of available repositories to use in `--repo-id`: {AVAILABLE_RAW_REPO_IDS}",
|
||||||
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--raw-dir",
|
"--raw-dir",
|
||||||
|
|
|
@ -208,8 +208,8 @@ def push_dataset_to_hub(
|
||||||
raw_dir = Path(raw_dir)
|
raw_dir = Path(raw_dir)
|
||||||
if not raw_dir.exists():
|
if not raw_dir.exists():
|
||||||
raise NotADirectoryError(
|
raise NotADirectoryError(
|
||||||
f"{raw_dir} does not exists. Check your paths or run this command to download an existing raw dataset on the hub:"
|
f"{raw_dir} does not exists. Check your paths or run this command to download an existing raw dataset on the hub: "
|
||||||
f"python lerobot/common/datasets/push_dataset_to_hub/_download_raw.py --raw-dir your/raw/dir --repo-id your/repo/id_raw"
|
f"`python lerobot/common/datasets/push_dataset_to_hub/_download_raw.py --raw-dir your/raw/dir --repo-id your/repo/id_raw`"
|
||||||
)
|
)
|
||||||
|
|
||||||
if local_dir:
|
if local_dir:
|
||||||
|
|
Loading…
Reference in New Issue