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_freq call 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 if eval_env has 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.

class callback.supervised_save_bestmodel_callback.SupervisedSaveBestModelCallback(summary_freq: int, log_dir: str, env_log_path: str, agent_id: str)[source]
class callback.intrinsic_reward_callback.IntrinsicRewardCallback(irs, verbose=0)[source]
init_callback(model: BaseAlgorithm) None[source]

_summary_

Parameters:

model (BaseAlgorithm) – _description_