Fix stable_baselines3/common/type_aliases.py type hint (#1189)

This commit is contained in:
Quentin Gallouédec 2022-11-29 12:26:16 +01:00 committed by GitHub
parent 0973b01b9d
commit 6902fac5e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -40,6 +40,7 @@ Others:
- Goal-conditioned environments are now characterized by the availability of the ``compute_reward`` method, rather than by their inheritance to ``gym.GoalEnv``
- Replaced ``CartPole-v0`` by ``CartPole-v1`` is tests
- Fixed ``tests/test_distributions.py`` type hint
- Fixed ``stable_baselines3/common/type_aliases.py`` type hint
Documentation:
^^^^^^^^^^^^^^

View file

@ -49,7 +49,6 @@ exclude = (?x)(
| stable_baselines3/common/save_util.py$
| stable_baselines3/common/sb2_compat/rmsprop_tf_like.py$
| stable_baselines3/common/torch_layers.py$
| stable_baselines3/common/type_aliases.py$
| stable_baselines3/common/utils.py$
| stable_baselines3/common/vec_env/__init__.py$
| stable_baselines3/common/vec_env/base_vec_env.py$

View file

@ -36,7 +36,7 @@ class RolloutBufferSamples(NamedTuple):
returns: th.Tensor
class DictRolloutBufferSamples(RolloutBufferSamples):
class DictRolloutBufferSamples(NamedTuple):
observations: TensorDict
actions: th.Tensor
old_values: th.Tensor
@ -53,7 +53,7 @@ class ReplayBufferSamples(NamedTuple):
rewards: th.Tensor
class DictReplayBufferSamples(ReplayBufferSamples):
class DictReplayBufferSamples(NamedTuple):
observations: TensorDict
actions: th.Tensor
next_observations: TensorDict