Skip to content

Commit ea54c27

Browse files
authored
Fix graph overlaps and some typos. (#16)
* Minor typo fixes for 2_gym_wrappers_saving_loading.ipynb * Adjust plot spacing and fix some typos. * The first plot cell defines a nice spacing to use which ensures that the y axis of the second plot doesn't overlap the first plot. This just copies that block of code to the other plotting cells. * Extract plotting into a helper function. * Clean up plot util function. * Undo unrelated colab changes. * Fix my own typo.
1 parent baca7e5 commit ea54c27

File tree

2 files changed

+54
-144
lines changed

2 files changed

+54
-144
lines changed

2_gym_wrappers_saving_loading.ipynb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
"source": [
379379
"## Second example: normalize actions\n",
380380
"\n",
381-
"It is usually a good idea to normalize observations and actions before giving it to the agent, this prevent [hard to debug issue](https://github.com/hill-a/stable-baselines/issues/473).\n",
381+
"It is usually a good idea to normalize observations and actions before giving it to the agent, this prevents this [hard to debug issue](https://github.com/hill-a/stable-baselines/issues/473).\n",
382382
"\n",
383383
"In this example, we are going to normalize the action space of *Pendulum-v1* so it lies in [-1, 1] instead of [-2, 2].\n",
384384
"\n",
@@ -425,7 +425,6 @@
425425
" \"\"\"\n",
426426
" Reset the environment \n",
427427
" \"\"\"\n",
428-
" # Reset the counter\n",
429428
" return self.env.reset()\n",
430429
"\n",
431430
" def step(self, action):\n",
@@ -505,7 +504,7 @@
505504
"source": [
506505
"#### Test with a RL algorithm\n",
507506
"\n",
508-
"We are going to use the Monitor wrapper of stable baselines, wich allow to monitor training stats (mean episode reward, mean episode length)"
507+
"We are going to use the Monitor wrapper of stable baselines, which allow to monitor training stats (mean episode reward, mean episode length)"
509508
]
510509
},
511510
{
@@ -610,7 +609,7 @@
610609
"source": [
611610
"## Additional wrappers: VecEnvWrappers\n",
612611
"\n",
613-
"In the same vein as gym wrappers, stable baselines provide wrappers for `VecEnv`. Among the different that exist (and you can create your own), you should know: \n",
612+
"In the same vein as gym wrappers, stable baselines provide wrappers for `VecEnv`. Among the different wrappers that exist (and you can create your own), you should know: \n",
614613
"\n",
615614
"- VecNormalize: it computes a running mean and standard deviation to normalize observation and returns\n",
616615
"- VecFrameStack: it stacks several consecutive observations (useful to integrate time in the observation, e.g. sucessive frame of an atari game)\n",
@@ -760,7 +759,7 @@
760759
"\n",
761760
"# Reset the environment\n",
762761
"\n",
763-
"# Take random actions in the enviromnent and check\n",
762+
"# Take random actions in the environment and check\n",
764763
"# that it returns the correct values after the end of each episode\n",
765764
"\n",
766765
"# ====================== #"
@@ -851,7 +850,7 @@
851850
" time_feature = 1 - (self._current_step / self._max_steps)\n",
852851
" if self._test_mode:\n",
853852
" time_feature = 1.0\n",
854-
" # Optionnaly: concatenate [time_feature, time_feature ** 2]\n",
853+
" # Optionally: concatenate [time_feature, time_feature ** 2]\n",
855854
" return np.concatenate((obs, [time_feature]))"
856855
],
857856
"execution_count": 0,

0 commit comments

Comments
 (0)