Skip to content

Fix DummyVecEnv reset options on episode end - #2287

Closed
lindicaphxag-tech wants to merge 1 commit into
DLR-RM:masterfrom
lindicaphxag-tech:fix/dummy-vec-env-reset-options
Closed

lindicaphxag-tech wants to merge 1 commit into
DLR-RM:masterfrom
lindicaphxag-tech:fix/dummy-vec-env-reset-options

Conversation

@lindicaphxag-tech

Copy link
Copy Markdown

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 explicit DummyVecEnv.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.py
  • python -m black --check stable_baselines3/common/vec_env/dummy_vec_env.py tests/test_vec_envs.py
  • git diff --check

AI disclosure

I used an AI coding assistant during development and reviewed the generated suggestions, implementation, and tests before opening this pull request.

@araffin araffin added the LLM generated We do not accept LLM generated issues/PR, please tell your human label Sep 15, 2026
@lindicaphxag-tech

Copy link
Copy Markdown
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.

@araffin araffin closed this Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LLM generated We do not accept LLM generated issues/PR, please tell your human

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Reset options ignored when resetting due to termination / truncation from within wrapper's step

2 participants