From f286eb059cd1d860fa7043f7c586cd24916fbb94 Mon Sep 17 00:00:00 2001 From: AdilZouitine Date: Wed, 10 Sep 2025 10:10:08 +0200 Subject: [PATCH] refactor(eval): specify type parameters for preprocessor and postprocessor in eval_policy function - Updated the type annotations for the preprocessor and postprocessor parameters in the eval_policy function to use PolicyProcessorPipeline with a dictionary type, enhancing type safety and clarity in the evaluation process. --- src/lerobot/scripts/eval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lerobot/scripts/eval.py b/src/lerobot/scripts/eval.py index 87058abb8..38501a2e2 100644 --- a/src/lerobot/scripts/eval.py +++ b/src/lerobot/scripts/eval.py @@ -220,8 +220,8 @@ def rollout( def eval_policy( env: gym.vector.VectorEnv, policy: PreTrainedPolicy, - preprocessor: PolicyProcessorPipeline, - postprocessor: PolicyProcessorPipeline, + preprocessor: PolicyProcessorPipeline[dict[str, Any]], + postprocessor: PolicyProcessorPipeline[dict[str, Any]], n_episodes: int, max_episodes_rendered: int = 0, videos_dir: Path | None = None,