From d120f96b611425114aca98644310cf1e2db02f8e Mon Sep 17 00:00:00 2001 From: Shantanu Date: Thu, 19 Sep 2024 10:59:17 -0500 Subject: [PATCH] Fix Issue #1: Use ProcessPoolExecutor instead of ThreadPoolExecutor --- lerobot/scripts/control_robot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerobot/scripts/control_robot.py b/lerobot/scripts/control_robot.py index a6506a3fe..068246558 100644 --- a/lerobot/scripts/control_robot.py +++ b/lerobot/scripts/control_robot.py @@ -445,7 +445,7 @@ def on_press(key): # Using `with` to exist smoothly if an execption is raised. futures = [] num_image_writers = num_image_writers_per_camera * len(robot.cameras) - with concurrent.futures.ThreadPoolExecutor(max_workers=num_image_writers) as executor: + with concurrent.futures.ProcessPoolExecutor(max_workers=num_image_writers) as executor: # Start recording all episodes while episode_index < num_episodes: logging.info(f"Recording episode {episode_index}")