mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-31 19:01:28 +00:00
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user