Skip to content

Commit 19f091f

Browse files
authored
Merge pull request #1 from RaikoPipe/fix_tests
Merged to master for convenience
2 parents ed308a7 + c4868b2 commit 19f091f

File tree

115 files changed

+2545
-1444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+2545
-1444
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: "\U0001F41B Bug Report"
2+
description: Submit a bug report to help us improve Stable-Baselines3
3+
title: "[Bug]: bug title"
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
**Important Note: We do not do technical support, nor consulting** and don't answer personal questions per email.
10+
Please post your question on the [RL Discord](https://discord.com/invite/xhfNqQv), [Reddit](https://www.reddit.com/r/reinforcementlearning/) or [Stack Overflow](https://stackoverflow.com/) in that case.
11+
12+
If your issue is related to a **custom gym environment**, please use the custom gym env template.
13+
- type: textarea
14+
id: description
15+
attributes:
16+
label: 🐛 Bug
17+
description: A clear and concise description of what the bug is.
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: reproduce
22+
attributes:
23+
label: To Reproduce
24+
description: |
25+
Steps to reproduce the behavior. Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.
26+
Please use the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
27+
value: |
28+
```python
29+
from stable_baselines3 import ...
30+
31+
```
32+
33+
- type: textarea
34+
id: traceback
35+
attributes:
36+
label: Relevant log output / Error message
37+
description: Please copy and paste any relevant log output / error message. This will be automatically formatted into code, so no need for backticks.
38+
placeholder: "Traceback (most recent call last): File ..."
39+
render: shell
40+
41+
- type: textarea
42+
id: system-info
43+
attributes:
44+
label: System Info
45+
description: |
46+
Describe the characteristic of your environment:
47+
* Describe how the library was installed (pip, docker, source, ...)
48+
* GPU models and configuration
49+
* Python version
50+
* PyTorch version
51+
* Gym version
52+
* Versions of any other relevant libraries
53+
54+
You can use `sb3.get_system_info()` to print relevant packages info:
55+
```python
56+
import stable_baselines3 as sb3
57+
sb3.get_system_info()
58+
```
59+
- type: checkboxes
60+
id: terms
61+
attributes:
62+
label: Checklist
63+
options:
64+
- label: I have checked that there is no similar [issue](https://github.com/DLR-RM/stable-baselines3/issues) in the repo
65+
required: true
66+
- label: I have read the [documentation](https://stable-baselines3.readthedocs.io/en/master/)
67+
required: true
68+
- label: I have provided a minimal working example to reproduce the bug
69+
required: true
70+
- label: I've used the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
71+
required: true

.github/ISSUE_TEMPLATE/custom_env.md

Lines changed: 0 additions & 95 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/custom_env.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: "\U0001F916 Custom Gym Environment Issue"
2+
description: How to report an issue when using a custom Gym environment
3+
labels: ["question", "custom gym env"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
**Important Note: We do not do technical support, nor consulting** and don't answer personal questions per email.
9+
Please post your question on the [RL Discord](https://discord.com/invite/xhfNqQv), [Reddit](https://www.reddit.com/r/reinforcementlearning/) or [Stack Overflow](https://stackoverflow.com/) in that case.
10+
11+
**Please check your environment first using**:
12+
```python
13+
from stable_baselines3.common.env_checker import check_env
14+
15+
env = CustomEnv(arg1, ...)
16+
# It will check your custom environment and output additional warnings if needed
17+
check_env(env)
18+
```
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: 🐛 Bug
23+
description: A clear and concise description of what the bug is.
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: code-example
28+
attributes:
29+
label: Code example
30+
description: |
31+
Please try to provide a minimal example to reproduce the bug.
32+
For a custom environment, you need to give at least the observation space, action space, `reset()` and `step()` methods (see working example below).
33+
Error messages and stack traces are also helpful.
34+
Please use the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
35+
value: |
36+
```python
37+
import gymnasium as gym
38+
import numpy as np
39+
40+
from stable_baselines3 import A2C
41+
from stable_baselines3.common.env_checker import check_env
42+
43+
44+
class CustomEnv(gym.Env):
45+
46+
def __init__(self):
47+
super().__init__()
48+
self.observation_space = gym.spaces.Box(low=-np.inf, high=np.inf, shape=(14,))
49+
self.action_space = gym.spaces.Box(low=-1, high=1, shape=(6,))
50+
51+
def reset(self):
52+
return self.observation_space.sample(), {}
53+
54+
def step(self, action):
55+
obs = self.observation_space.sample()
56+
reward = 1.0
57+
done = False
58+
truncated = False
59+
info = {}
60+
return obs, reward, done, truncated, info
61+
62+
env = CustomEnv()
63+
check_env(env)
64+
65+
model = A2C("MlpPolicy", env, verbose=1).learn(1000)
66+
```
67+
68+
- type: textarea
69+
id: traceback
70+
attributes:
71+
label: Relevant log output / Error message
72+
description: Please copy and paste any relevant log output / error message. This will be automatically formatted into code, so no need for backticks.
73+
placeholder: "Traceback (most recent call last): File ..."
74+
render: shell
75+
76+
- type: textarea
77+
id: system-info
78+
attributes:
79+
label: System Info
80+
description: |
81+
Describe the characteristic of your environment:
82+
* Describe how the library was installed (pip, docker, source, ...)
83+
* GPU models and configuration
84+
* Python version
85+
* PyTorch version
86+
* Gym version
87+
* Versions of any other relevant libraries
88+
89+
You can use `sb3.get_system_info()` to print relevant packages info:
90+
```python
91+
import stable_baselines3 as sb3
92+
sb3.get_system_info()
93+
```
94+
- type: checkboxes
95+
id: terms
96+
attributes:
97+
label: Checklist
98+
options:
99+
- label: I have checked that there is no similar [issue](https://github.com/DLR-RM/stable-baselines3/issues) in the repo
100+
required: true
101+
- label: I have read the [documentation](https://stable-baselines3.readthedocs.io/en/master/)
102+
required: true
103+
- label: I have provided a minimal working example to reproduce the bug
104+
required: true
105+
- label: I have checked my env using the env checker
106+
required: true
107+
- label: I've used the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
108+
required: true

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "\U0001F4DA Documentation"
2+
description: Report an issue related to Stable-Baselines3 documentation
3+
labels: ["documentation"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
**Important Note: We do not do technical support, nor consulting** and don't answer personal questions per email.
9+
Please post your question on the [RL Discord](https://discord.com/invite/xhfNqQv), [Reddit](https://www.reddit.com/r/reinforcementlearning/) or [Stack Overflow](https://stackoverflow.com/) in that case.
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: 📚 Documentation
14+
description: A clear and concise description of what should be improved in the documentation.
15+
validations:
16+
required: true
17+
- type: checkboxes
18+
id: terms
19+
attributes:
20+
label: Checklist
21+
options:
22+
- label: I have checked that there is no similar [issue](https://github.com/DLR-RM/stable-baselines3/issues) in the repo
23+
required: true
24+
- label: I have read the [documentation](https://stable-baselines3.readthedocs.io/en/master/)
25+
required: true

0 commit comments

Comments
 (0)