diff --git a/src/lerobot/envs/factory.py b/src/lerobot/envs/factory.py index 355a6560f..927be754e 100644 --- a/src/lerobot/envs/factory.py +++ b/src/lerobot/envs/factory.py @@ -56,7 +56,7 @@ def make_env_pre_post_processors( # For LIBERO environments, add the LiberoProcessorStep if isinstance(env_cfg, LiberoEnv) or "libero" in env_cfg.type: return PolicyProcessorPipeline(steps=[LiberoProcessorStep()]) - + # For all other environments, return an identity processor (does nothing) return PolicyProcessorPipeline(steps=[]) diff --git a/src/lerobot/scripts/lerobot_eval.py b/src/lerobot/scripts/lerobot_eval.py index c9d1b49f9..c1b821635 100644 --- a/src/lerobot/scripts/lerobot_eval.py +++ b/src/lerobot/scripts/lerobot_eval.py @@ -166,7 +166,7 @@ def rollout( # Infer "task" from attributes of environments. # TODO: works with SyncVectorEnv but not AsyncVectorEnv observation = add_envs_task(env, observation) - + # Apply environment-specific preprocessing (e.g., LiberoProcessorStep for LIBERO) observation = env_preprocessor(observation) @@ -524,10 +524,10 @@ def eval_main(cfg: EvalPipelineConfig): pretrained_path=cfg.policy.pretrained_path, preprocessor_overrides=preprocessor_overrides, ) - + # Create environment-specific preprocessor (e.g., for LIBERO environments) env_preprocessor = make_env_pre_post_processors(env_cfg=cfg.env) - + with torch.no_grad(), torch.autocast(device_type=device.type) if cfg.policy.use_amp else nullcontext(): info = eval_policy_all( envs=envs,