forked from tangger/lerobot
only try to start env if it is closed
This commit is contained in:
@@ -90,6 +90,7 @@ def eval_policy(
|
|||||||
if policy is not None:
|
if policy is not None:
|
||||||
policy.clear_action_queue()
|
policy.clear_action_queue()
|
||||||
|
|
||||||
|
if env.is_closed:
|
||||||
env.start() # needed to be able to get the seeds the first time as BatchedEnvs are lazy
|
env.start() # needed to be able to get the seeds the first time as BatchedEnvs are lazy
|
||||||
seeds.extend(env._next_seed)
|
seeds.extend(env._next_seed)
|
||||||
with torch.inference_mode():
|
with torch.inference_mode():
|
||||||
|
|||||||
Reference in New Issue
Block a user