From fa7a3168f31d9331a72b099468763ed4abec34b6 Mon Sep 17 00:00:00 2001 From: BertrandDecoster <70576987+BertrandDecoster@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:02:47 +0200 Subject: [PATCH] Update the Callbacks: Evaluate Agent Performance section of the Examples (#1604) * Update examples.rst section "Callbacks: Evaluate Agent Performance" Two typos fixed * Update changelog --------- Co-authored-by: Antonin Raffin --- docs/guide/examples.rst | 4 ++-- docs/misc/changelog.rst | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/guide/examples.rst b/docs/guide/examples.rst index e5b9db0..7a0586c 100644 --- a/docs/guide/examples.rst +++ b/docs/guide/examples.rst @@ -319,7 +319,7 @@ You can control the evaluation frequency with ``eval_freq`` to monitor your agen from stable_baselines3 import SAC from stable_baselines3.common.callbacks import EvalCallback - from stable-baselines3.common.env_util import make_vec_env + from stable_baselines3.common.env_util import make_vec_env env_id = "Pendulum-v1" n_training_envs = 1 @@ -330,7 +330,7 @@ You can control the evaluation frequency with ``eval_freq`` to monitor your agen os.makedirs(eval_log_dir, exist_ok=True) # Initialize a vectorized training environment with default parameters - train_env = make_vec_env(env_id, n_env=n_training_envs, seed=0) + train_env = make_vec_env(env_id, n_envs=n_training_envs, seed=0) # Separate evaluation env, with different parameters passed via env_kwargs # Eval environments can be vectorized to speed up evaluation. diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 7bb1f16..38255d0 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -35,6 +35,7 @@ Others: Documentation: ^^^^^^^^^^^^^^ +- Fixed callback example (@BertrandDecoster) Release 2.0.0 (2023-06-22) @@ -1395,4 +1396,4 @@ And all the contributors: @Melanol @qgallouedec @francescoluciano @jlp-ue @burakdmb @timothe-chaumont @honglu2875 @anand-bala @hughperkins @sidney-tio @AlexPasqua @dominicgkerr @Akhilez @Rocamonde @tobirohrer @ZikangXiong @DavyMorgan @luizapozzobon @Bonifatius94 @theSquaredError @harveybellini @DavyMorgan @FieteO @jonasreiher @npit @WeberSamuel @troiganto -@lutogniew @lbergmann1 @lukashass +@lutogniew @lbergmann1 @lukashass @BertrandDecoster