From d43fa600a02b324c04442d30917922d41d81c645 Mon Sep 17 00:00:00 2001 From: Alexander Soare Date: Fri, 22 Mar 2024 15:32:55 +0000 Subject: [PATCH] only try to start env if it is closed --- lerobot/scripts/eval.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lerobot/scripts/eval.py b/lerobot/scripts/eval.py index 4135570bd..f0c2f0744 100644 --- a/lerobot/scripts/eval.py +++ b/lerobot/scripts/eval.py @@ -90,7 +90,8 @@ def eval_policy( if policy is not None: policy.clear_action_queue() - env.start() # needed to be able to get the seeds the first time as BatchedEnvs are lazy + if env.is_closed: + env.start() # needed to be able to get the seeds the first time as BatchedEnvs are lazy seeds.extend(env._next_seed) with torch.inference_mode(): # TODO(alexander-soare): When `break_when_any_done == False` this rolls out for max_steps even when all