Callback
- class callback.custom_eval_callback.CustomEvalCallback(eval_env: Env, n_eval_episodes: int = 5, eval_steps: int = 1120, env_log_path: str = '', eval_freq: int = 20000, deterministic: bool = True, verbose: int = 0)[source]
Callback for evaluating an agent.
- Parameters:
eval_env – The environment used for initialization
n_eval_episodes – The number of episodes to tests the agent
eval_freq – Evaluate the agent every
eval_freqcall of the callback.log_path – Path to a folder where the evaluations (
evaluations.npz) will be saved. It will be updated at each evaluation.deterministic – Whether the evaluation should use a stochastic or deterministic actions.
render – Whether to render or not the environment during evaluation
verbose –
warn – Passed to
evaluate_policy(warns ifeval_envhas not been wrapped with a Monitor wrapper)
- class callback.hyperparam_callback.HParamCallback(verbose: int = 0)[source]
Saves the hyperparameters and metrics at the start of the training, and logs them to TensorBoard.