Skip to content

Commit

Permalink
Small grammar fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestum committed Sep 14, 2023
1 parent 83541e5 commit 0e29395
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rl_zoo3/exp_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ def make_env(**kwargs) -> gym.Env:
env = spec.make(**kwargs)
return env

# On most env, SubprocVecEnv does not help and is quite memory hungry
# therefore we use DummyVecEnv by default
# On most env, SubprocVecEnv does not help and is quite memory hungry,
# therefore, we use DummyVecEnv by default
env = make_vec_env(
make_env,
n_envs=n_envs,
Expand Down Expand Up @@ -649,9 +649,9 @@ def make_env(**kwargs) -> gym.Env:
if not is_vecenv_wrapped(env, VecTransposeImage):
wrap_with_vectranspose = False
if isinstance(env.observation_space, spaces.Dict):
# If even one of the keys is a image-space in need of transpose, apply transpose
# If the image spaces are not consistent (for instance one is channel first,
# the other channel last), VecTransposeImage will throw an error
# If even one of the keys is an image-space in need of transpose, apply transpose
# If the image spaces are not consistent (for instance, one is channel first,
# the other channel last); VecTransposeImage will throw an error
for space in env.observation_space.spaces.values():
wrap_with_vectranspose = wrap_with_vectranspose or (
is_image_space(space) and not is_image_space_channels_first(space)
Expand Down Expand Up @@ -696,7 +696,7 @@ def _load_pretrained_agent(self, hyperparams: Dict[str, Any], env: VecEnv) -> Ba
return model

def _create_sampler(self, sampler_method: str) -> BaseSampler:
# n_warmup_steps: Disable pruner until the trial reaches the given number of step.
# n_warmup_steps: Disable pruner until the trial reaches the given number of steps.
if sampler_method == "random":
sampler = RandomSampler(seed=self.seed)
elif sampler_method == "tpe":
Expand Down Expand Up @@ -741,7 +741,7 @@ def objective(self, trial: optuna.Trial) -> float:
env = self.create_envs(n_envs, no_log=True)

# By default, do not activate verbose output to keep
# stdout clean with only the trials results
# stdout clean with only the trial's results
trial_verbosity = 0
# Activate verbose mode for the trial in debug mode
# See PR #214
Expand Down

0 comments on commit 0e29395

Please sign in to comment.