Skip to content

Commit

Permalink
Add precommit config yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cschindlbeck committed Jul 26, 2024
1 parent bd3c0c6 commit 70999c7
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .codespell_words
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Parth
Reacher
reacher
theses
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: pretty-format-json
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ['--write-changes', '--ignore-words=.codespell_words']
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Expand Down
2 changes: 1 addition & 1 deletion docs/_static/img/colab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/common/envs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ SimpleMultiObsEnv
-----------------

.. autoclass:: SimpleMultiObsEnv
:members:
:members:
2 changes: 1 addition & 1 deletion docs/modules/a2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Train a A2C agent on ``CartPole-v1`` using 4 environments.
env = make_vec_env("CartPole-v1", n_envs=8, vec_env_cls=SubprocVecEnv)
model = A2C("MlpPolicy", env, device="cpu")
model.learn(total_timesteps=25_000)
For more information, see :ref:`Vectorized Environments <vec_env>`, `Issue #1245 <https://github.com/DLR-RM/stable-baselines3/issues/1245>`_ or the `Multiprocessing notebook <https://colab.research.google.com/github/Stable-Baselines-Team/rl-colab-notebooks/blob/sb3/multiprocessing_rl.ipynb>`_.


Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/common/on_policy_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def collect_rollouts(
# Reshape in case of discrete action
actions = actions.reshape(-1, 1)

# Handle timeout by bootstraping with value function
# Handle timeout by bootstrapping with value function
# see GitHub issue #633
for idx, done in enumerate(dones):
if (
Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/her/her_replay_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def truncate_last_trajectory(self) -> None:
"If you are in the same episode as when the replay buffer was saved,\n"
"you should use `truncate_last_trajectory=False` to avoid that issue."
)
# only consider epsiodes that are not finished
# only consider episodes that are not finished
for env_idx in np.where(self._current_ep_start != self.pos)[0]:
# set done = True for last episodes
self.dones[self.pos - 1, env_idx] = True
Expand Down

0 comments on commit 70999c7

Please sign in to comment.