diff --git a/lerobot/common/robot_devices/control_utils.py b/lerobot/common/robot_devices/control_utils.py index a80879c36..41afdf720 100644 --- a/lerobot/common/robot_devices/control_utils.py +++ b/lerobot/common/robot_devices/control_utils.py @@ -287,11 +287,6 @@ def control_loop( if dataset is not None: frame = {**observation, **action} -<<<<<<< HEAD - if "next.reward" in events: - frame["next.reward"] = events["next.reward"] -======= ->>>>>>> main dataset.add_frame(frame) if display_cameras and not is_headless(): @@ -375,11 +370,7 @@ def sanity_check_dataset_robot_compatibility( mismatches = [] for field, dataset_value, present_value in fields: -<<<<<<< HEAD - diff = DeepDiff(dataset_value, present_value) -======= diff = DeepDiff(dataset_value, present_value, exclude_regex_paths=[r".*\['info'\]$"]) ->>>>>>> main 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 7cf91735f..b876cd1ec 100644 --- a/lerobot/scripts/control_robot.py +++ b/lerobot/scripts/control_robot.py @@ -200,10 +200,7 @@ def record( video: bool = True, run_compute_stats: bool = True, push_to_hub: bool = True, -<<<<<<< HEAD -======= tags: list[str] | None = None, ->>>>>>> main num_image_writer_processes: int = 0, num_image_writer_threads_per_camera: int = 4, display_cameras: bool = True, @@ -266,10 +263,6 @@ def record( use_videos=video, image_writer_processes=num_image_writer_processes, image_writer_threads=num_image_writer_threads_per_camera * len(robot.cameras), -<<<<<<< HEAD - features=extra_features, -======= ->>>>>>> main ) if not robot.is_connected: @@ -342,11 +335,7 @@ def record( dataset.consolidate(run_compute_stats) if push_to_hub: -<<<<<<< HEAD - dataset.push_to_hub() -======= dataset.push_to_hub(tags=tags) ->>>>>>> main log_say("Exiting", play_sounds) return dataset @@ -360,11 +349,7 @@ def replay( episode: int, fps: int | None = None, play_sounds: bool = True, -<<<<<<< HEAD - local_files_only: bool = True, -======= local_files_only: bool = False, ->>>>>>> main ): # TODO(rcadene, aliberts): refactor with control_loop, once `dataset` is an instance of LeRobotDataset # TODO(rcadene): Add option to record logs @@ -519,21 +504,12 @@ if __name__ == "__main__": "Not enough threads might cause low camera fps." ), ) -<<<<<<< HEAD - # parser_record.add_argument( - # "--force-override", - # 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.", - # ) -======= parser_record.add_argument( "--resume", type=int, default=0, help="Resume recording on an existing dataset.", ) ->>>>>>> main parser_record.add_argument( "-p", "--pretrained-policy-name-or-path", diff --git a/lerobot/scripts/visualize_dataset.py b/lerobot/scripts/visualize_dataset.py index a37910686..cdd5ce605 100644 --- a/lerobot/scripts/visualize_dataset.py +++ b/lerobot/scripts/visualize_dataset.py @@ -275,16 +275,10 @@ def main(): kwargs = vars(args) repo_id = kwargs.pop("repo_id") root = kwargs.pop("root") -<<<<<<< HEAD - - logging.info("Loading dataset") - dataset = LeRobotDataset(repo_id, root=root, local_files_only=True) -======= local_files_only = kwargs.pop("local_files_only") logging.info("Loading dataset") dataset = LeRobotDataset(repo_id, root=root, local_files_only=local_files_only) ->>>>>>> main visualize_dataset(dataset, **vars(args)) diff --git a/lerobot/scripts/visualize_dataset_html.py b/lerobot/scripts/visualize_dataset_html.py index c76bdd037..2c81fbfc5 100644 --- a/lerobot/scripts/visualize_dataset_html.py +++ b/lerobot/scripts/visualize_dataset_html.py @@ -288,13 +288,9 @@ def main(): kwargs = vars(args) repo_id = kwargs.pop("repo_id") root = kwargs.pop("root") -<<<<<<< HEAD - dataset = LeRobotDataset(repo_id, root=root, local_files_only=True) -======= local_files_only = kwargs.pop("local_files_only") dataset = LeRobotDataset(repo_id, root=root, local_files_only=local_files_only) ->>>>>>> main visualize_dataset_html(dataset, **kwargs)