Skip to content

Commit de92025

Browse files
authored
Prepare Release v2.0 (#192)
1 parent 6e1aba4 commit de92025

File tree

10 files changed

+24
-17
lines changed

10 files changed

+24
-17
lines changed

docs/misc/changelog.rst

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

6-
Release 2.0.0a13 (WIP)
6+
Release 2.0.0 (2023-06-22)
77
--------------------------
88

99
**Gymnasium support**

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ line-length = 127
44
# Assume Python 3.7
55
target-version = "py37"
66
select = ["E", "F", "B", "UP", "C90", "RUF"]
7-
# Ignore explicit stacklevel`
8-
ignore = ["B028"]
7+
# B028: Ignore explicit stacklevel`
8+
# RUF013: Too many false positives (implicit optional)
9+
ignore = ["B028", "RUF013"]
10+
11+
[tool.ruff.per-file-ignores]
12+
# ClassVar, implicit optional check not needed for tests
13+
"./tests/*.py"= ["RUF012", "RUF013"]
914

1015
[tool.ruff.mccabe]
1116
# Unlike Flake8, ruff default to a complexity level of 10.

sb3_contrib/ars/ars.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import time
44
import warnings
55
from functools import partial
6-
from typing import Any, Dict, Optional, Type, TypeVar, Union
6+
from typing import Any, ClassVar, Dict, Optional, Type, TypeVar, Union
77

88
import numpy as np
99
import torch as th
@@ -50,7 +50,7 @@ class ARS(BaseAlgorithm):
5050
:param _init_setup_model: Whether or not to build the network at the creation of the instance
5151
"""
5252

53-
policy_aliases: Dict[str, Type[BasePolicy]] = {
53+
policy_aliases: ClassVar[Dict[str, Type[BasePolicy]]] = {
5454
"MlpPolicy": MlpPolicy,
5555
"LinearPolicy": LinearPolicy,
5656
}

sb3_contrib/ppo_mask/ppo_mask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
import time
33
from collections import deque
4-
from typing import Any, Dict, Optional, Tuple, Type, TypeVar, Union
4+
from typing import Any, ClassVar, Dict, Optional, Tuple, Type, TypeVar, Union
55

66
import numpy as np
77
import torch as th
@@ -69,7 +69,7 @@ class MaskablePPO(OnPolicyAlgorithm):
6969
:param _init_setup_model: Whether or not to build the network at the creation of the instance
7070
"""
7171

72-
policy_aliases: Dict[str, Type[BasePolicy]] = {
72+
policy_aliases: ClassVar[Dict[str, Type[BasePolicy]]] = {
7373
"MlpPolicy": MlpPolicy,
7474
"CnnPolicy": CnnPolicy,
7575
"MultiInputPolicy": MultiInputPolicy,

sb3_contrib/ppo_recurrent/ppo_recurrent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
import time
33
from copy import deepcopy
4-
from typing import Any, Dict, Optional, Type, TypeVar, Union
4+
from typing import Any, ClassVar, Dict, Optional, Type, TypeVar, Union
55

66
import numpy as np
77
import torch as th
@@ -67,7 +67,7 @@ class RecurrentPPO(OnPolicyAlgorithm):
6767
:param _init_setup_model: Whether or not to build the network at the creation of the instance
6868
"""
6969

70-
policy_aliases: Dict[str, Type[BasePolicy]] = {
70+
policy_aliases: ClassVar[Dict[str, Type[BasePolicy]]] = {
7171
"MlpLstmPolicy": MlpLstmPolicy,
7272
"CnnLstmPolicy": CnnLstmPolicy,
7373
"MultiInputLstmPolicy": MultiInputLstmPolicy,

sb3_contrib/qrdqn/qrdqn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import warnings
2-
from typing import Any, Dict, List, Optional, Tuple, Type, TypeVar, Union
2+
from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, TypeVar, Union
33

44
import numpy as np
55
import torch as th
@@ -60,7 +60,7 @@ class QRDQN(OffPolicyAlgorithm):
6060
:param _init_setup_model: Whether or not to build the network at the creation of the instance
6161
"""
6262

63-
policy_aliases: Dict[str, Type[BasePolicy]] = {
63+
policy_aliases: ClassVar[Dict[str, Type[BasePolicy]]] = {
6464
"MlpPolicy": MlpPolicy,
6565
"CnnPolicy": CnnPolicy,
6666
"MultiInputPolicy": MultiInputPolicy,

sb3_contrib/tqc/tqc.py

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

33
import numpy as np
44
import torch as th
@@ -68,7 +68,7 @@ class TQC(OffPolicyAlgorithm):
6868
:param _init_setup_model: Whether or not to build the network at the creation of the instance
6969
"""
7070

71-
policy_aliases: Dict[str, Type[BasePolicy]] = {
71+
policy_aliases: ClassVar[Dict[str, Type[BasePolicy]]] = {
7272
"MlpPolicy": MlpPolicy,
7373
"CnnPolicy": CnnPolicy,
7474
"MultiInputPolicy": MultiInputPolicy,

sb3_contrib/trpo/trpo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import copy
22
import warnings
33
from functools import partial
4-
from typing import Any, Dict, List, Optional, Tuple, Type, TypeVar, Union
4+
from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, TypeVar, Union
55

66
import numpy as np
77
import torch as th
@@ -69,7 +69,7 @@ class TRPO(OnPolicyAlgorithm):
6969
:param _init_setup_model: Whether or not to build the network at the creation of the instance
7070
"""
7171

72-
policy_aliases: Dict[str, Type[BasePolicy]] = {
72+
policy_aliases: ClassVar[Dict[str, Type[BasePolicy]]] = {
7373
"MlpPolicy": MlpPolicy,
7474
"CnnPolicy": CnnPolicy,
7575
"MultiInputPolicy": MultiInputPolicy,

sb3_contrib/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

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
packages=[package for package in find_packages() if package.startswith("sb3_contrib")],
6666
package_data={"sb3_contrib": ["py.typed", "version.txt"]},
6767
install_requires=[
68-
"stable_baselines3>=2.0.0a13",
68+
"stable_baselines3>=2.0.0",
6969
],
7070
description="Contrib package of Stable Baselines3, experimental code.",
7171
author="Antonin Raffin",
@@ -82,8 +82,10 @@
8282
project_urls={
8383
"Code": "https://github.com/Stable-Baselines-Team/stable-baselines3-contrib",
8484
"Documentation": "https://sb3-contrib.readthedocs.io/",
85+
"Changelog": "https://stable-baselines3.readthedocs.io/en/master/misc/changelog.html",
8586
"Stable-Baselines3": "https://github.com/DLR-RM/stable-baselines3",
8687
"RL-Zoo": "https://github.com/DLR-RM/rl-baselines3-zoo",
88+
"SBX": "https://github.com/araffin/sbx",
8789
},
8890
classifiers=[
8991
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)