Fixed typos (#1076)

* Updated docstring from n_steps to n_rollout_steps

This must be a typo

* Fixed typo in a comment in ppo.py

* Update changelog

Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>
Co-authored-by: Antonin Raffin <antonin.raffin@dlr.de>
This commit is contained in:
Akhil 2022-09-28 08:57:46 -04:00 committed by GitHub
parent e22e372306
commit def0574d03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -52,6 +52,7 @@ Documentation:
- Fixed typo in install doc(@jlp-ue) - Fixed typo in install doc(@jlp-ue)
- Clarified and standardized verbosity documentation - Clarified and standardized verbosity documentation
- Added link to a GitHub issue in the custom policy documentation (@AlexPasqua) - Added link to a GitHub issue in the custom policy documentation (@AlexPasqua)
- Fixed typos (@Akhilez)
Release 1.6.0 (2022-07-11) Release 1.6.0 (2022-07-11)
@ -1040,4 +1041,4 @@ And all the contributors:
@simoninithomas @armandpl @manuel-delverme @Gautam-J @gianlucadecola @buoyancy99 @caburu @xy9485 @simoninithomas @armandpl @manuel-delverme @Gautam-J @gianlucadecola @buoyancy99 @caburu @xy9485
@Gregwar @ycheng517 @quantitative-technologies @bcollazo @git-thor @TibiGG @cool-RR @MWeltevrede @Gregwar @ycheng517 @quantitative-technologies @bcollazo @git-thor @TibiGG @cool-RR @MWeltevrede
@Melanol @qgallouedec @francescoluciano @jlp-ue @burakdmb @timothe-chaumont @honglu2875 @Melanol @qgallouedec @francescoluciano @jlp-ue @burakdmb @timothe-chaumont @honglu2875
@anand-bala @hughperkins @sidney-tio @AlexPasqua @dominicgkerr @anand-bala @hughperkins @sidney-tio @AlexPasqua @dominicgkerr @Akhilez @Rocamonde

View file

@ -143,7 +143,7 @@ class OnPolicyAlgorithm(BaseAlgorithm):
:param callback: Callback that will be called at each step :param callback: Callback that will be called at each step
(and at the beginning and end of the rollout) (and at the beginning and end of the rollout)
:param rollout_buffer: Buffer to fill with rollouts :param rollout_buffer: Buffer to fill with rollouts
:param n_steps: Number of experiences to collect per environment :param n_rollout_steps: Number of experiences to collect per environment
:return: True if function returned with at least `n_rollout_steps` :return: True if function returned with at least `n_rollout_steps`
collected, False if callback terminated rollout prematurely. collected, False if callback terminated rollout prematurely.
""" """

View file

@ -234,7 +234,7 @@ class PPO(OnPolicyAlgorithm):
# No clipping # No clipping
values_pred = values values_pred = values
else: else:
# Clip the different between old and new value # Clip the difference between old and new value
# NOTE: this depends on the reward scaling # NOTE: this depends on the reward scaling
values_pred = rollout_data.old_values + th.clamp( values_pred = rollout_data.old_values + th.clamp(
values - rollout_data.old_values, -clip_range_vf, clip_range_vf values - rollout_data.old_values, -clip_range_vf, clip_range_vf