mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-09-16 22:20:26 +00:00
Monkey-patch np.bool = bool
This commit is contained in:
parent
68a40e0940
commit
213b06b0c6
2 changed files with 7 additions and 1 deletions
2
setup.py
2
setup.py
|
|
@ -77,7 +77,7 @@ setup(
|
|||
package_data={"stable_baselines3": ["py.typed", "version.txt"]},
|
||||
install_requires=[
|
||||
"gym==0.21", # Fixed version due to breaking changes in 0.22
|
||||
"numpy<1.24", # Required for gym==0.21
|
||||
"numpy",
|
||||
"torch>=1.11",
|
||||
'typing_extensions>=4.0,<5; python_version < "3.8.0"',
|
||||
# For saving models
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import os
|
||||
|
||||
import numpy as np
|
||||
|
||||
from stable_baselines3.a2c import A2C
|
||||
from stable_baselines3.common.utils import get_system_info
|
||||
from stable_baselines3.ddpg import DDPG
|
||||
|
|
@ -9,6 +11,10 @@ from stable_baselines3.ppo import PPO
|
|||
from stable_baselines3.sac import SAC
|
||||
from stable_baselines3.td3 import TD3
|
||||
|
||||
# Small monkey patch so gym 0.21 is compatible with numpy >= 1.24
|
||||
# TODO: remove when upgrading to gym 0.26
|
||||
np.bool = bool
|
||||
|
||||
# Read version from file
|
||||
version_file = os.path.join(os.path.dirname(__file__), "version.txt")
|
||||
with open(version_file) as file_handler:
|
||||
|
|
|
|||
Loading…
Reference in a new issue