diff --git a/lerobot/common/datasets/push_dataset_to_hub/_download_raw.py b/lerobot/common/datasets/push_dataset_to_hub/_download_raw.py index 7974ab8e..91ba9ef1 100644 --- a/lerobot/common/datasets/push_dataset_to_hub/_download_raw.py +++ b/lerobot/common/datasets/push_dataset_to_hub/_download_raw.py @@ -31,6 +31,49 @@ from pathlib import Path 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): # Check repo_id is well formated @@ -62,55 +105,15 @@ def download_raw(raw_dir: Path, repo_id: str): def download_all_raw_datasets(): data_dir = Path("data") - 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: + for repo_id in AVAILABLE_RAW_REPO_IDS: raw_dir = data_dir / repo_id download_raw(raw_dir, repo_id) 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( "--raw-dir", diff --git a/lerobot/scripts/push_dataset_to_hub.py b/lerobot/scripts/push_dataset_to_hub.py index 012de94f..fe62e7c1 100644 --- a/lerobot/scripts/push_dataset_to_hub.py +++ b/lerobot/scripts/push_dataset_to_hub.py @@ -208,8 +208,8 @@ def push_dataset_to_hub( raw_dir = Path(raw_dir) if not raw_dir.exists(): 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"python lerobot/common/datasets/push_dataset_to_hub/_download_raw.py --raw-dir your/raw/dir --repo-id your/repo/id_raw" + 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`" ) if local_dir: