From 30c7a9e6fc3db27a5bb6211e0749023c5a5ef29f Mon Sep 17 00:00:00 2001 From: Remi Cadene Date: Fri, 12 Jul 2024 20:00:41 +0200 Subject: [PATCH] nit + num-image-writers 8 --- lerobot/scripts/control_robot.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lerobot/scripts/control_robot.py b/lerobot/scripts/control_robot.py index c5227f82..031fb7d7 100644 --- a/lerobot/scripts/control_robot.py +++ b/lerobot/scripts/control_robot.py @@ -209,7 +209,7 @@ def record_dataset( num_episodes=50, video=True, run_compute_stats=True, - num_image_writters=4, + num_image_writers=8, force_override=False, ): # TODO(rcadene): Add option to record logs @@ -292,7 +292,7 @@ def record_dataset( # Using `with` to exist smoothly if an execption is raised. # Using only 4 worker threads to avoid blocking the main thread. futures = [] - with concurrent.futures.ThreadPoolExecutor(max_workers=num_image_writters) as executor: + with concurrent.futures.ThreadPoolExecutor(max_workers=num_image_writers) as executor: # Start recording all episodes while episode_index < num_episodes: logging.info(f"Recording episode {episode_index}") @@ -406,7 +406,7 @@ def record_dataset( if stop_recording or episode_index == num_episodes: logging.info("Done recording") os.system('say "Done recording"') - logging.info("Waiting for threads writting the images on disk to terminate...") + logging.info("Waiting for threads writing the images on disk to terminate...") listener.stop() for _ in tqdm.tqdm( concurrent.futures.as_completed(futures), total=len(futures), desc="Writting images" @@ -615,10 +615,10 @@ if __name__ == "__main__": ) parser_record.add_argument( - "--num-image-writters", + "--num-image-writers", type=int, - default=4, - help="Number of threads writting the frames as png images on disk. Don't set too much as you might get unstable fps due to main thread being blocked.", + default=8, + help="Number of threads writing the frames as png images on disk. Don't set too much as you might get unstable fps due to main thread being blocked.", ) parser_record.add_argument( "--force-override",