Skip to content

Commit 07f7447

Browse files
authored
Release v2.0.0 (#388)
* Release v2.0.0 * Reformat
1 parent 2d5db11 commit 07f7447

File tree

7 files changed

+30
-13
lines changed

7 files changed

+30
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
## Release 2.0.0a12 (WIP)
1+
## Release 2.0.0 (2023-06-22)
2+
3+
**Gymnasium support**
4+
5+
> **Warning**
6+
> Stable-Baselines3 (SB3) v2.0.0 will be the last one supporting python 3.7
27
38
### Breaking Changes
4-
- Upgraded to gym 0.26+
59
- Fixed bug in HistoryWrapper, now returns the correct obs space limits
610
- Upgraded to SB3 >= 2.0.0
711
- Upgraded to Huggingface-SB3 >= 2.2.5
12+
- Upgraded to Gym API 0.26+, RL Zoo3 doesn't work anymore with Gym 0.21
813

914
### New Features
15+
- Added Gymnasium support
1016
- Gym 0.26+ patches to continue working with pybullet and TimeLimit wrapper
1117

1218
### Bug fixes

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
gym==0.26.2
2-
stable-baselines3[extra_no_roms,tests,docs]>=2.0.0a13
3-
sb3-contrib>=2.0.0a13
2+
stable-baselines3[extra_no_roms,tests,docs]>=2.0.0
3+
sb3-contrib>=2.0.0
44
box2d-py==2.3.8
55
pybullet
66
# minigrid

rl_zoo3/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0a13
1+
2.0.0

rl_zoo3/wrappers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Dict, Optional, SupportsFloat, Tuple
1+
from typing import Any, ClassVar, Dict, Optional, SupportsFloat, Tuple
22

33
import gymnasium as gym
44
import numpy as np
@@ -299,7 +299,7 @@ class MaskVelocityWrapper(gym.ObservationWrapper):
299299
"""
300300

301301
# Supported envs
302-
velocity_indices = {
302+
velocity_indices: ClassVar[Dict[str, np.ndarray]] = {
303303
"CartPole-v1": np.array([1, 3]),
304304
"MountainCar-v0": np.array([1]),
305305
"MountainCarContinuous-v0": np.array([1]),

setup.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
},
2828
entry_points={"console_scripts": ["rl_zoo3=rl_zoo3.cli:main"]},
2929
install_requires=[
30-
"sb3_contrib>=2.0.0a13",
31-
"gym==0.26.2",
30+
"sb3_contrib>=2.0.0",
31+
"gym==0.26.2", # for patches to make gym backward compat
3232
"huggingface_sb3>=2.2.5",
3333
"tqdm",
3434
"rich",
@@ -52,6 +52,15 @@
5252
version=__version__,
5353
python_requires=">=3.7",
5454
# PyPI package information.
55+
# PyPI package information.
56+
project_urls={
57+
"Code": "https://github.com/DLR-RM/rl-baselines3-zoo",
58+
"Documentation": "https://rl-baselines3-zoo.readthedocs.io/en/master/",
59+
"Changelog": "https://github.com/DLR-RM/rl-baselines3-zoo/blob/master/CHANGELOG.md",
60+
"Stable-Baselines3": "https://github.com/DLR-RM/stable-baselines3",
61+
"RL-Zoo": "https://github.com/DLR-RM/rl-baselines3-zoo",
62+
"SBX": "https://github.com/araffin/sbx",
63+
},
5564
classifiers=[
5665
"Programming Language :: Python :: 3",
5766
"Programming Language :: Python :: 3.7",

tests/dummy_env/test_env/test_env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
from typing import ClassVar
2+
13
import gymnasium as gym
24
import numpy as np
35
from gymnasium import spaces
46

57

68
class TestEnv(gym.Env):
7-
metadata = {"render_modes": ["human"], "render_fps": 4}
9+
metadata: ClassVar[dict] = {"render_modes": ["human"], "render_fps": 4}
810
__test__ = False
911

1012
def __init__(self, render_mode=None):

tests/test_enjoy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ def test_load(tmp_path):
8787
# Load best model
8888
args = ["-n", str(N_STEPS), "-f", tmp_path, "--algo", algo, "--env", env_id, "--no-render"]
8989
# Test with progress bar
90-
return_code = subprocess.call(["python", "enjoy.py", *args] + ["--load-best", "-P"])
90+
return_code = subprocess.call(["python", "enjoy.py", *args, "--load-best", "-P"])
9191
_assert_eq(return_code, 0)
9292

9393
# Load checkpoint
94-
return_code = subprocess.call(["python", "enjoy.py", *args] + ["--load-checkpoint", str(500)])
94+
return_code = subprocess.call(["python", "enjoy.py", *args, "--load-checkpoint", str(500)])
9595
_assert_eq(return_code, 0)
9696

9797
# Load last checkpoint
98-
return_code = subprocess.call(["python", "enjoy.py", *args] + ["--load-last-checkpoint"])
98+
return_code = subprocess.call(["python", "enjoy.py", *args, "--load-last-checkpoint"])
9999
_assert_eq(return_code, 0)
100100

101101

0 commit comments

Comments
 (0)