* Fix VecNormalize type hints
* Fix VecEnv utils type annotations
* Apply suggestions from code review
Co-authored-by: M. Ernestus <maximilian@ernestus.de>
* Remove PyType
---------
Co-authored-by: M. Ernestus <maximilian@ernestus.de>
* Add rollout_buffer_class and rollout_buffer_kwargs parameters to OnPolicyAlgorithm
* Add rollout_buffer_class and rollout_buffer_kwargs to PPO.
* Add rollout_buffer_class and rollout_buffer_kwargs to A2C.
* Make use of the rollout buffer kwargs.
* Update version
* Add test and update doc
---------
Co-authored-by: Antonin Raffin <antonin.raffin@dlr.de>
* Update signatures, and test with options
* Update changelog and black formatting
* Finish implementation (fixes, doc, tests)
* Use deepcopy to avoid side effects (modif by reference)
* Fix for mypy
---------
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
* fix: Follow PEP8 guidelines and evaluate falsy to truth with `not` rather than `is False`.
https://docs.python.org/2/library/stdtypes.html#truth-value-testing
* chore: Update changelog inline with intent of changes in PR #1707
Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>
* fix: Change `is False` to `not` as per PEP8
* chore: Remove superfluous comment about `is False`
* test: One On- and one Off-Policy algorithm (A2C and SAC respectively), with settings to speed up testing
* Update changelog
* chore: Remove EvalCallback as it's not actually required
* Update changelog.rst
* Rm duplicated "others" section in changelog.rst
---------
Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>
Co-authored-by: Antonin Raffin <antonin.raffin@ensta.org>
* Fix reward of SimpleMultiObsEnv to always be float
Previously the reward was sometimes returned as an int.
* changelog
* Update changelog.rst
* Update version.txt
* Fix type annotation
* Fix import
---------
Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>
Co-authored-by: Antonin Raffin <antonin.raffin@ensta.org>
* prevents squash_output if not use_sde, see #1592
* update changelog
* add unscaling of actions taken during training
* add test regarding squashing and unquashing
* avoids try-except block
* format Gymnasium code with black
* makes mypy pass
* makes pytype pass
* sort imports
* makes error message in assert statement clearer
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
* improves code commenting
* replaces full env with wrapper
* Cleanup code
* Reformat
---------
Co-authored-by: PatrickHelm <patrick.helm@gmx.net>
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
Co-authored-by: Antonin Raffin <antonin.raffin@dlr.de>
* Fix type hints in `common/utils.py`
* Fix `VecTranspose` type annotations
* Fix types for callbacks
* Update changelog
* Fix video recorder type hints
* Fix save utils type hints
* Allow BytesIO
* Improve error message
* Make logger and training env properties
* Clarify which open_path fn is called
* Fix bug in env_checker.py bounds warning message
* Fix bug where Gym Environment Checker does not output the correct warning message when dealing with observation spaces that have different upper and different lower bounds
* Update test_env_checker.py with more comprehensive tests
* Make naming consistent
* Update version
* Catch all invalid indices at once
---------
Co-authored-by: gabo_tor <gabriel0torre@gmail.com>
* Added test cases where off policy algorithms fail with float64 actionspace
* casting observations and actions to `np.float32` to unify behaviour between `ReplayBuffer` and `RolloutBuffer`. Fixing issue #1145
* reformatted using black
* making test more restrictive by checking models action is float64
* added changelog entry
* undo cast of observations as `preprocessing.preprocess_obs()` casts them to float32 anyways.
* - Casting to float32 only, if action.dtype is float64
- Added cast to `DictReplayBuffer` as well
* Added tests for multiple variations of continuous action types and observation spaces
* applied reformatting by `make commit-checks`
* Added typing and comment referring to description in merge request
* Apply linter for single element slice
* Rename helper and refactor tests
* Update changelog and docstring
---------
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
* Docs: Add mobile-env to community projects
* Update docs Readme with correct install command
Without the quotes, I get `no matches found: .[docs]`
* Add changelog entry for adding mobile-env
* Fix format in projects.rst
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
---------
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
* Update setup.py to v0.29.0
* Remove invalid test
* Loosen version and update changelog
---------
Co-authored-by: Antonin Raffin <antonin.raffin@ensta.org>
* change ordering of achieved_goal and desired_goal to match expected compute_reward order
* Update changelog.rst
* Update version
* Update version.txt
* Update changelog.rst
---------
Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>