Skip to content

Commit 121d49a

Browse files
committed
Update doc and changelog
1 parent 9cbce82 commit 121d49a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/guide/vec_envs.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ Consider the following example for a custom env:
148148
print(vec_env.env_method("get_wrapper_attr", "mu"))
149149
# Change `mu` attribute via the setter
150150
vec_env.env_method("set_mu", "mu", 0.1)
151+
# If the variable exists, you can also use `set_wrapper_attr` to set it
152+
assert vec_env.has_attr("mu")
153+
vec_env.env_method("set_wrapper_attr", "mu", 0.1)
151154
152155
153156
In this example ``env.mu`` cannot be accessed/changed directly because it is wrapped in a ``VecEnv`` and because it could be wrapped with other wrappers (see `GH#1573 <https://github.com/DLR-RM/stable-baselines3/issues/1573>`_ for a longer explanation).

docs/misc/changelog.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Changelog
44
==========
55

6-
Release 2.6.0a1 (WIP)
6+
Release 2.6.0a2 (WIP)
77
--------------------------
88

99

@@ -14,6 +14,7 @@ New Features:
1414
^^^^^^^^^^^^^
1515
- Added ``has_attr`` method for ``VecEnv`` to check if an attribute exists
1616
- Added ``LogEveryNTimesteps`` callback to dump logs every N timesteps (note: you need to pass ``log_interval=None`` to avoid any interference)
17+
- Added Gymnasium v1.1 support
1718

1819
Bug Fixes:
1920
^^^^^^^^^^
@@ -36,11 +37,14 @@ Others:
3637
^^^^^^^
3738
- Updated black from v24 to v25
3839
- Improved error messages when checking Box space equality (loading ``VecNormalize``)
40+
- Updated test to reflect how ``set_wrapper_attr`` should be used now
3941

4042
Documentation:
4143
^^^^^^^^^^^^^^
4244
- Clarify the use of Gym wrappers with ``make_vec_env`` in the section on Vectorized Environments (@pstahlhofen)
4345
- Updated callback doc for ``EveryNTimesteps``
46+
- Added doc on how to set env attributes via ``VecEnv`` calls
47+
4448

4549
Release 2.5.0 (2025-01-27)
4650
--------------------------

0 commit comments

Comments
 (0)