-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ActorCriticRLModel
: Don't unnecessarily reinitialize Runner (#639)
* Runner reset easy * [f] Import thing * [pickable] PPO1 progress * Revert PPO1 progres * Revert "Revert PPO1 progres" This reverts commit 64c7bd2b6cbdffd74cdde8b4e8cd0ee0494ec38c. * Tests are passing now that we rm TRPO-based models * [pickable] Simplify total_episode_reward_logger * Make runner initialization lazy * Update tests * Merge ActorCriticRLModel{,WithRunner} classes * Fix acer typing by using `self.` rather than `self.runner.*` * fix typo * Fix lint, docs, etc * Update changelog * learn: Reuse `self.episode_reward` * Fix bad merge * Revert "learn: Reuse `self.episode_reward`" This reverts commit c7592d08b095f0b4ea77a186e90c4523a2f3167e. * Update stable_baselines/common/identity_env.py Co-Authored-By: Adam Gleave <adam@gleave.me> * Update tests/test_multiple_learn.py Co-Authored-By: Adam Gleave <adam@gleave.me> * Address comments * Fix bad merge * ActorCriticRLModel: Always reset Runner on For consistency with logging statistic resets in BaseRLModel. Responsibility for avoiding resets due to `set_env()` should lie with the caller. * IdentityEnv: Allow dim=None and space=None This way we can satisfy both constraints: (1) Subclasses don't have to set `dim=None` when they call `super().__init__(space=space, ...)`. (2) `test_envs.py` can call `IdentityEnv()` with no arguments. * test_envs: Check all identity test envs * identity_env: Fix typo * lint * Update stable_baselines/common/identity_env.py Co-Authored-By: Adam Gleave <adam@gleave.me> * Update stable_baselines/common/identity_env.py Co-Authored-By: Adam Gleave <adam@gleave.me> Co-authored-by: Adam Gleave <adam@gleave.me>
- Loading branch information
1 parent
d000b87
commit 4fada47
Showing
9 changed files
with
188 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.