mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-18 09:54:10 +00:00
Update issue templates and env infos (#1451)
* Update issue templates and env infos * Fix pytype
This commit is contained in:
parent
40e0b9d2c8
commit
96526ed08a
5 changed files with 20 additions and 8 deletions
3
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
3
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -48,7 +48,8 @@ body:
|
||||||
* GPU models and configuration
|
* GPU models and configuration
|
||||||
* Python version
|
* Python version
|
||||||
* PyTorch version
|
* PyTorch version
|
||||||
* Gym version
|
* Gymnasium version
|
||||||
|
* (if installed) OpenAI Gym version
|
||||||
* Versions of any other relevant libraries
|
* Versions of any other relevant libraries
|
||||||
|
|
||||||
You can use `sb3.get_system_info()` to print relevant packages info:
|
You can use `sb3.get_system_info()` to print relevant packages info:
|
||||||
|
|
|
||||||
9
.github/ISSUE_TEMPLATE/custom_env.yml
vendored
9
.github/ISSUE_TEMPLATE/custom_env.yml
vendored
|
|
@ -34,9 +34,9 @@ body:
|
||||||
Please use the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
|
Please use the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
|
||||||
value: |
|
value: |
|
||||||
```python
|
```python
|
||||||
import gym
|
import gymnasium as gym
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from gym import spaces
|
from gymnasium import spaces
|
||||||
|
|
||||||
from stable_baselines3 import A2C
|
from stable_baselines3 import A2C
|
||||||
from stable_baselines3.common.env_checker import check_env
|
from stable_baselines3.common.env_checker import check_env
|
||||||
|
|
@ -49,7 +49,7 @@ body:
|
||||||
self.observation_space = spaces.Box(low=-np.inf, high=np.inf, shape=(14,))
|
self.observation_space = spaces.Box(low=-np.inf, high=np.inf, shape=(14,))
|
||||||
self.action_space = spaces.Box(low=-1, high=1, shape=(6,))
|
self.action_space = spaces.Box(low=-1, high=1, shape=(6,))
|
||||||
|
|
||||||
def reset(self, seed=None):
|
def reset(self, seed=None, options=None):
|
||||||
return self.observation_space.sample(), {}
|
return self.observation_space.sample(), {}
|
||||||
|
|
||||||
def step(self, action):
|
def step(self, action):
|
||||||
|
|
@ -84,7 +84,8 @@ body:
|
||||||
* GPU models and configuration
|
* GPU models and configuration
|
||||||
* Python version
|
* Python version
|
||||||
* PyTorch version
|
* PyTorch version
|
||||||
* Gym version
|
* Gymnasium version
|
||||||
|
* (if installed) OpenAI Gym version
|
||||||
* Versions of any other relevant libraries
|
* Versions of any other relevant libraries
|
||||||
|
|
||||||
You can use `sb3.get_system_info()` to print relevant packages info:
|
You can use `sb3.get_system_info()` to print relevant packages info:
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Changelog
|
Changelog
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Release 2.0.0a4 (WIP)
|
Release 2.0.0a5 (WIP)
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
**Gymnasium support**
|
**Gymnasium support**
|
||||||
|
|
@ -51,6 +51,7 @@ Others:
|
||||||
- Improve type annotation of wrappers
|
- Improve type annotation of wrappers
|
||||||
- Tests envs are now checked too
|
- Tests envs are now checked too
|
||||||
- Added render test for ``VecEnv``
|
- Added render test for ``VecEnv``
|
||||||
|
- Update issue templates and env info saved with the model
|
||||||
|
|
||||||
Documentation:
|
Documentation:
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ from inspect import signature
|
||||||
from itertools import zip_longest
|
from itertools import zip_longest
|
||||||
from typing import Dict, Iterable, List, Optional, Tuple, Union
|
from typing import Dict, Iterable, List, Optional, Tuple, Union
|
||||||
|
|
||||||
|
import cloudpickle
|
||||||
import gymnasium as gym
|
import gymnasium as gym
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch as th
|
import torch as th
|
||||||
|
|
@ -532,8 +533,16 @@ def get_system_info(print_info: bool = True) -> Tuple[Dict[str, str], str]:
|
||||||
"PyTorch": th.__version__,
|
"PyTorch": th.__version__,
|
||||||
"GPU Enabled": str(th.cuda.is_available()),
|
"GPU Enabled": str(th.cuda.is_available()),
|
||||||
"Numpy": np.__version__,
|
"Numpy": np.__version__,
|
||||||
"Gym": gym.__version__,
|
"Cloudpickle": cloudpickle.__version__,
|
||||||
|
"Gymnasium": gym.__version__,
|
||||||
}
|
}
|
||||||
|
try:
|
||||||
|
import gym as openai_gym # pytype: disable=import-error
|
||||||
|
|
||||||
|
env_info.update({"OpenAI Gym": openai_gym.__version__})
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
env_info_str = ""
|
env_info_str = ""
|
||||||
for key, value in env_info.items():
|
for key, value in env_info.items():
|
||||||
env_info_str += f"- {key}: {value}\n"
|
env_info_str += f"- {key}: {value}\n"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2.0.0a4
|
2.0.0a5
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue