Repository navigation
Fix DummyVecEnv reset options on episode end - #2287
Closed
lindicaphxag-tech wants to merge 1 commit into
Closed
lindicaphxag-tech wants to merge 1 commit into
lindicaphxag-tech wants to merge 1 commit into
Conversation
Author
|
Fresh local verification on commit 27214d8: tests/test_vec_envs.py completed with 34 passed, 3 skipped in 103.59s; ruff and black checks also pass. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1790.
When
DummyVecEnv.step_wait()automatically resets an environment after termination or truncation, it now forwards the pending seed and reset options just like an explicitDummyVecEnv.reset(). The per-environment seed and options are consumed after that reset.A regression test covers options passed through
set_options()on an episode-ending step.Testing
python -m pytest tests/test_vec_envs.py -q(34 passed, 3 skipped)python -m ruff check stable_baselines3/common/vec_env/dummy_vec_env.py tests/test_vec_envs.pypython -m black --check stable_baselines3/common/vec_env/dummy_vec_env.py tests/test_vec_envs.pygit diff --checkAI disclosure
I used an AI coding assistant during development and reviewed the generated suggestions, implementation, and tests before opening this pull request.