mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-21 17:01:53 +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(
|
def eval_policy(
|
||||||
env: gym.vector.VectorEnv,
|
env: gym.vector.VectorEnv,
|
||||||
policy: PreTrainedPolicy,
|
policy: PreTrainedPolicy,
|
||||||
preprocessor: PolicyProcessorPipeline,
|
preprocessor: PolicyProcessorPipeline[dict[str, Any]],
|
||||||
postprocessor: PolicyProcessorPipeline,
|
postprocessor: PolicyProcessorPipeline[dict[str, Any]],
|
||||||
n_episodes: int,
|
n_episodes: int,
|
||||||
max_episodes_rendered: int = 0,
|
max_episodes_rendered: int = 0,
|
||||||
videos_dir: Path | None = None,
|
videos_dir: Path | None = None,
|
||||||
|
|||||||
Reference in New Issue
Block a user