diff --git a/examples/10_use_so100.md b/examples/10_use_so100.md index 32d7f22dd..2309b7bb7 100644 --- a/examples/10_use_so100.md +++ b/examples/10_use_so100.md @@ -192,7 +192,6 @@ Record 2 episodes and upload your dataset to the hub: python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/so100.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/so100_test \ --tags so100 tutorial \ --warmup-time-s 5 \ @@ -212,7 +211,6 @@ echo ${HF_USER}/so100_test If you didn't upload with `--push-to-hub 0`, you can also visualize it locally with: ```bash python lerobot/scripts/visualize_dataset_html.py \ - --root data \ --repo-id ${HF_USER}/so100_test ``` @@ -223,7 +221,6 @@ Now try to replay the first episode on your robot: DATA_DIR=data python lerobot/scripts/control_robot.py replay \ --robot-path lerobot/configs/robot/so100.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/so100_test \ --episode 0 ``` @@ -259,7 +256,6 @@ You can use the `record` function from [`lerobot/scripts/control_robot.py`](../l python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/so100.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/eval_act_so100_test \ --tags so100 tutorial eval \ --warmup-time-s 5 \ diff --git a/examples/11_use_moss.md b/examples/11_use_moss.md index 4ccbb93db..39a56e933 100644 --- a/examples/11_use_moss.md +++ b/examples/11_use_moss.md @@ -192,7 +192,6 @@ Record 2 episodes and upload your dataset to the hub: python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/moss.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/moss_test \ --tags moss tutorial \ --warmup-time-s 5 \ @@ -212,7 +211,6 @@ echo ${HF_USER}/moss_test If you didn't upload with `--push-to-hub 0`, you can also visualize it locally with: ```bash python lerobot/scripts/visualize_dataset_html.py \ - --root data \ --repo-id ${HF_USER}/moss_test ``` @@ -223,7 +221,6 @@ Now try to replay the first episode on your robot: DATA_DIR=data python lerobot/scripts/control_robot.py replay \ --robot-path lerobot/configs/robot/moss.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/moss_test \ --episode 0 ``` @@ -259,7 +256,6 @@ You can use the `record` function from [`lerobot/scripts/control_robot.py`](../l python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/moss.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/eval_act_moss_test \ --tags moss tutorial eval \ --warmup-time-s 5 \ diff --git a/examples/7_get_started_with_real_robot.md b/examples/7_get_started_with_real_robot.md index 9db7e2521..a6bfe65a4 100644 --- a/examples/7_get_started_with_real_robot.md +++ b/examples/7_get_started_with_real_robot.md @@ -778,7 +778,6 @@ Now run this to record 2 episodes: python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/koch.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/koch_test \ --tags tutorial \ --warmup-time-s 5 \ @@ -787,7 +786,7 @@ python lerobot/scripts/control_robot.py record \ --num-episodes 2 ``` -This will write your dataset locally to `{root}/{repo-id}` (e.g. `data/cadene/koch_test`) and push it on the hub at `https://huggingface.co/datasets/{HF_USER}/{repo-id}`. Your dataset will be automatically tagged with `LeRobot` for the community to find it easily, and you can also add custom tags (in this case `tutorial` for example). +This will write your dataset locally to `~/.cache/huggingface/lerobot/{repo-id}` (e.g. `data/cadene/koch_test`) and push it on the hub at `https://huggingface.co/datasets/{HF_USER}/{repo-id}`. Your dataset will be automatically tagged with `LeRobot` for the community to find it easily, and you can also add custom tags (in this case `tutorial` for example). You can look for other LeRobot datasets on the hub by searching for `LeRobot` tags: https://huggingface.co/datasets?other=LeRobot @@ -840,7 +839,6 @@ In the coming months, we plan to release a foundational model for robotics. We a You can visualize your dataset by running: ```bash python lerobot/scripts/visualize_dataset_html.py \ - --root data \ --repo-id ${HF_USER}/koch_test ``` @@ -858,7 +856,6 @@ To replay the first episode of the dataset you just recorded, run the following python lerobot/scripts/control_robot.py replay \ --robot-path lerobot/configs/robot/koch.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/koch_test \ --episode 0 ``` @@ -991,7 +988,6 @@ To this end, you can use the `record` function from [`lerobot/scripts/control_ro python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/koch.yaml \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/eval_koch_test \ --tags tutorial eval \ --warmup-time-s 5 \ @@ -1010,7 +1006,6 @@ As you can see, it's almost the same command as previously used to record your t You can then visualize your evaluation dataset by running the same command as before but with the new inference dataset as argument: ```bash python lerobot/scripts/visualize_dataset.py \ - --root data \ --repo-id ${HF_USER}/eval_koch_test ``` diff --git a/examples/8_use_stretch.md b/examples/8_use_stretch.md index 97caf2ba8..c2c306f07 100644 --- a/examples/8_use_stretch.md +++ b/examples/8_use_stretch.md @@ -128,7 +128,6 @@ Record one episode: python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/stretch.yaml \ --fps 20 \ - --root data \ --repo-id ${HF_USER}/stretch_test \ --tags stretch tutorial \ --warmup-time-s 3 \ @@ -146,7 +145,6 @@ Now try to replay this episode (make sure the robot's initial position is the sa python lerobot/scripts/control_robot.py replay \ --robot-path lerobot/configs/robot/stretch.yaml \ --fps 20 \ - --root data \ --repo-id ${HF_USER}/stretch_test \ --episode 0 ``` diff --git a/examples/9_use_aloha.md b/examples/9_use_aloha.md index cf5e1ceca..866120b5f 100644 --- a/examples/9_use_aloha.md +++ b/examples/9_use_aloha.md @@ -84,7 +84,6 @@ python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/aloha.yaml \ --robot-overrides max_relative_target=null \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/aloha_test \ --tags aloha tutorial \ --warmup-time-s 5 \ @@ -104,7 +103,6 @@ echo ${HF_USER}/aloha_test If you didn't upload with `--push-to-hub 0`, you can also visualize it locally with: ```bash python lerobot/scripts/visualize_dataset_html.py \ - --root data \ --repo-id ${HF_USER}/aloha_test ``` @@ -119,7 +117,6 @@ python lerobot/scripts/control_robot.py replay \ --robot-path lerobot/configs/robot/aloha.yaml \ --robot-overrides max_relative_target=null \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/aloha_test \ --episode 0 ``` @@ -156,7 +153,6 @@ python lerobot/scripts/control_robot.py record \ --robot-path lerobot/configs/robot/aloha.yaml \ --robot-overrides max_relative_target=null \ --fps 30 \ - --root data \ --repo-id ${HF_USER}/eval_act_aloha_test \ --tags aloha tutorial eval \ --warmup-time-s 5 \ diff --git a/lerobot/common/datasets/lerobot_dataset.py b/lerobot/common/datasets/lerobot_dataset.py index 78a3aeaa0..b32cf7095 100644 --- a/lerobot/common/datasets/lerobot_dataset.py +++ b/lerobot/common/datasets/lerobot_dataset.py @@ -298,7 +298,7 @@ def create( f"Some cameras in your {robot.robot_type} robot don't have an fps matching the fps of your dataset." "In this case, frames from lower fps cameras will be repeated to fill in the blanks." ) - elif robot_type is None or features is None: + elif features is None: raise ValueError( "Dataset features must either come from a Robot or explicitly passed upon creation." ) diff --git a/lerobot/common/robot_devices/control_utils.py b/lerobot/common/robot_devices/control_utils.py index d5df031c3..9b9649dde 100644 --- a/lerobot/common/robot_devices/control_utils.py +++ b/lerobot/common/robot_devices/control_utils.py @@ -353,7 +353,7 @@ def sanity_check_dataset_robot_compatibility( mismatches = [] for field, dataset_value, present_value in fields: - diff = DeepDiff(dataset_value, present_value) + diff = DeepDiff(dataset_value, present_value, exclude_regex_paths=[r".*\['info'\]$"]) if diff: mismatches.append(f"{field}: expected {present_value}, got {dataset_value}") diff --git a/lerobot/scripts/control_robot.py b/lerobot/scripts/control_robot.py index ad73eef49..3e7235639 100644 --- a/lerobot/scripts/control_robot.py +++ b/lerobot/scripts/control_robot.py @@ -29,7 +29,6 @@ ```bash python lerobot/scripts/control_robot.py record \ --fps 30 \ - --root tmp/data \ --repo-id $USER/koch_test \ --num-episodes 1 \ --run-compute-stats 0 @@ -38,7 +37,6 @@ - Visualize dataset: ```bash python lerobot/scripts/visualize_dataset.py \ - --root tmp/data \ --repo-id $USER/koch_test \ --episode-index 0 ``` @@ -47,7 +45,6 @@ ```bash python lerobot/scripts/control_robot.py replay \ --fps 30 \ - --root tmp/data \ --repo-id $USER/koch_test \ --episode 0 ``` @@ -57,7 +54,6 @@ ```bash python lerobot/scripts/control_robot.py record \ --fps 30 \ - --root data \ --repo-id $USER/koch_pick_place_lego \ --num-episodes 50 \ --warmup-time-s 2 \ @@ -88,7 +84,6 @@ ```bash python lerobot/scripts/control_robot.py record \ --fps 30 \ - --root data \ --repo-id $USER/eval_act_koch_real \ --num-episodes 10 \ --warmup-time-s 2 \ @@ -191,7 +186,7 @@ def teleoperate( @safe_disconnect def record( robot: Robot, - root: str, + root: Path, repo_id: str, single_task: str, pretrained_policy_name_or_path: str | None = None, @@ -204,6 +199,7 @@ def record( video: bool = True, run_compute_stats: bool = True, push_to_hub: bool = True, + tags: list[str] | None = None, num_image_writer_processes: int = 0, num_image_writer_threads_per_camera: int = 4, display_cameras: bool = True, @@ -331,7 +327,7 @@ def record( dataset.consolidate(run_compute_stats) if push_to_hub: - dataset.push_to_hub() + dataset.push_to_hub(tags=tags) log_say("Exiting", play_sounds) return dataset @@ -427,7 +423,7 @@ def replay( parser_record.add_argument( "--root", type=Path, - default="data", + default=None, help="Root directory where the dataset will be stored locally at '{root}/{repo_id}' (e.g. 'data/hf_username/dataset_name').", ) parser_record.add_argument( @@ -495,10 +491,10 @@ def replay( ), ) parser_record.add_argument( - "--force-override", + "--resume", type=int, default=0, - help="By default, data recording is resumed. When set to 1, delete the local directory and start data recording from scratch.", + help="Resume recording on an existing dataset.", ) parser_record.add_argument( "-p", @@ -523,7 +519,7 @@ def replay( parser_replay.add_argument( "--root", type=Path, - default="data", + default=None, help="Root directory where the dataset will be stored locally at '{root}/{repo_id}' (e.g. 'data/hf_username/dataset_name').", ) parser_replay.add_argument(