Skip to content

Commit e05e2c7

Browse files
committed
Update env_checker.py
To now throw a warning if using the start value of discrete action space
1 parent 48b403f commit e05e2c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stable_baselines3/common/env_checker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _check_non_zero_start(space: spaces.Space, space_type: str = "observation",
3232
:param key: When the observation space comes from a Dict space, we pass the
3333
corresponding key to have more precise warning messages. Defaults to "".
3434
"""
35-
if isinstance(space, (spaces.Discrete, spaces.MultiDiscrete)) and not _starts_at_zero(space):
35+
if isinstance(space, spaces.MultiDiscrete) and not _starts_at_zero(space):
3636
maybe_key = f"(key='{key}')" if key else ""
3737
warnings.warn(
3838
f"{type(space).__name__} {space_type} space {maybe_key} with a non-zero start (start={space.start}) "

0 commit comments

Comments
 (0)