evorl.evaluators.evaluator¶
Module Contents¶
Classes¶
Evaluate the agent in the environments. |
API¶
- class evorl.evaluators.evaluator.Evaluator[source]¶
Bases:
evorl.types.PyTreeNodeEvaluate the agent in the environments.
- Variables:
env – Vectorized environment w/o autoreset.
action_fn – The agent action function.
max_episode_steps – The maximum number of steps in an episode.
discount – The discount factor.
- action_fn: evorl.agent.AgentActionFn¶
‘pytree_field(…)’
- discount: float¶
‘pytree_field(…)’
- env: evorl.envs.Env¶
‘pytree_field(…)’
- evaluate(agent_state: evorl.agent.AgentState, key: chex.PRNGKey, num_episodes: int) evorl.metrics.EvaluateMetric[source]¶
Evaluate the agent based on its state.
- Parameters:
agent_state – The state of the agent.
key – The PRNG key.
num_episodes – The number of episodes to evaluate.
- Returns:
EvaluateMetric(episode_returns, episode_lengths).
- max_episode_steps: int¶
‘pytree_field(…)’