Skip to content

Commit

Permalink
SubprocVecEnv close fix. Fixes #898 (#899)
Browse files Browse the repository at this point in the history
* Add a seed() method to vectorized environments (fixes #675).

* Updated Changelog

* Updated Changelog (again) and added type hints.

* Update docstring

* Added curiosity wrapper.

* Fixed imports.

* Fix for SubprocVecEnv closing.
Updated changelog.

* Better changelog.

* Removed curiosity from fixes branch.

Co-authored-by: NeoExtended <wirspielen@web.de>
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
  • Loading branch information
3 people committed Jun 20, 2020
1 parent 0c956eb commit d288b6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Bug Fixes:
- Fixed a bug in ``SAC`` where any convolutional layers were not included in the target network parameters.
- Fixed ``render()`` method for ``VecEnvs``
- Fixed ``seed()``` method for ``SubprocVecEnv``
- Fixed a bug in the ``close()`` method of ``SubprocVecEnv``, causing wrappers further down in the wrapper stack to not be closed. (@NeoExtended)

Deprecations:
^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions stable_baselines/common/vec_env/subproc_vec_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def _worker(remote, parent_remote, env_fn_wrapper):
elif cmd == 'render':
remote.send(env.render(data))
elif cmd == 'close':
env.close()
remote.close()
break
elif cmd == 'get_spaces':
Expand Down

0 comments on commit d288b6d

Please sign in to comment.