Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN cd ${CODE_DIR}/stable-baselines3 && \
uv pip install --system torch --default-index ${PYTORCH_DEPS} && \
uv pip install --system -e .[extra,tests,docs] && \
# Use headless version for docker
uv pip uninstall opencv-python && \
uv pip uninstall --system opencv-python && \
uv pip install --system opencv-python-headless && \
pip cache purge && \
uv cache clean
Expand Down
1 change: 1 addition & 0 deletions docs/misc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Fixed mypy error in test_vec_envs.py by wrapping `itertools.product` with `list()`
- Improved tests coverage for RMSpropTFLike optimizer (invalid params, centered/momentum/weight_decay branches, pickle roundtrip)
- Improved test coverage for `save_util.py`: added tests for `BadZipFile` error handling in `load_from_zip_file` and `IsADirectoryError`/`FileNotFoundError` handling in `open_path`
- Fixed Docker build by adding the missing `--system` flag to `uv pip uninstall opencv-python` (required by recent `uv`)

### Documentation:

Expand Down
1 change: 0 additions & 1 deletion stable_baselines3/common/envs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
"IdentityEnvMultiBinary",
"IdentityEnvMultiDiscrete",
"SimpleMultiObsEnv",
"SimpleMultiObsEnv",
]
4 changes: 2 additions & 2 deletions stable_baselines3/common/vec_env/base_vec_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def render(self, mode: str | None = None) -> np.ndarray | None:
self.env_method("render")
return None

def seed(self, seed: int | None = None) -> Sequence[None | int]:
def seed(self, seed: int | None = None) -> Sequence[int | None]:
"""
Sets the random seeds for all environments, based on a given seed.
Each individual environment will still get its own seed, by incrementing the given seed.
Expand Down Expand Up @@ -392,7 +392,7 @@ def reset(self) -> VecEnvObs:
def step_wait(self) -> VecEnvStepReturn:
pass

def seed(self, seed: int | None = None) -> Sequence[None | int]:
def seed(self, seed: int | None = None) -> Sequence[int | None]:
return self.venv.seed(seed)

def set_options(self, options: list[dict] | dict | None = None) -> None:
Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/ppo/ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
gamma: float = 0.99,
gae_lambda: float = 0.95,
clip_range: float | Schedule = 0.2,
clip_range_vf: None | float | Schedule = None,
clip_range_vf: float | Schedule | None = None,
normalize_advantage: bool = True,
ent_coef: float = 0.0,
vf_coef: float = 0.5,
Expand Down