Skip to content

Commit

Permalink
Remove forward() method from common.policies.BaseModel (#1061)
Browse files Browse the repository at this point in the history
* Remove forward() method.

* Updated changelog
  • Loading branch information
Rocamonde authored Sep 11, 2022
1 parent 98e786f commit 18b29a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Bug Fixes:
- Fixed missing verbose parameter passing in the ``EvalCallback`` constructor (@burakdmb)
- Fixed the issue that when updating the target network in DQN, SAC, TD3, the ``running_mean`` and ``running_var`` properties of batch norm layers are not updated (@honglu2875)
- Fixed incorrect type annotation of the replay_buffer_class argument in ``common.OffPolicyAlgorithm`` initializer, where an instance instead of a class was required (@Rocamonde)
- Removed ``forward()`` abstract method declaration from ``common.policies.BaseModel`` (already defined in ``torch.nn.Module``) to fix type errors in subclasses (@Rocamonde)

Deprecations:
^^^^^^^^^^^^^
Expand Down
4 changes: 0 additions & 4 deletions stable_baselines3/common/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ def __init__(
self.features_extractor_class = features_extractor_class
self.features_extractor_kwargs = features_extractor_kwargs

@abstractmethod
def forward(self, *args, **kwargs):
pass

def _update_features_extractor(
self,
net_kwargs: Dict[str, Any],
Expand Down

0 comments on commit 18b29a6

Please sign in to comment.