Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve issue templates to provide more guidance #1563

Merged
merged 5 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "\U0001F41B Bug Report"
description: Submit a bug report to help us improve Stable-Baselines3
description: If you encounter an unexpected behavior, software crash, or other bug.
title: "[Bug]: bug title"
labels: ["bug"]
body:
Expand Down Expand Up @@ -61,6 +61,8 @@ body:
attributes:
label: Checklist
options:
- label: My issue does not relate to a custom gym environment. (Use the custom gym env template instead)
required: true
- label: I have checked that there is no similar [issue](https://github.com/DLR-RM/stable-baselines3/issues) in the repo
required: true
- label: I have read the [documentation](https://stable-baselines3.readthedocs.io/en/master/)
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/custom_env.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "\U0001F916 Custom Gym Environment Issue"
description: How to report an issue when using a custom Gym environment
labels: ["question", "custom gym env"]
description: If your problem involves a custom gym environment.
labels: ["custom gym env"]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "\U0001F4DA Documentation"
description: Report an issue related to Stable-Baselines3 documentation
description: If you want to improve the documentation by reporting errors, inconsistencies, or missing information.
labels: ["documentation"]
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "\U0001F680 Feature Request"
description: How to create an issue for requesting a feature
description: If you have an idea for a new feature or an improvement.
title: "[Feature Request] request title"
labels: ["enhancement"]
body:
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "❓ Question"
description: How to ask a question regarding Stable-Baselines3
description: If you have a general question about Stable-Baselines3.
title: "[Question] question title"
labels: ["question"]
body:
Expand All @@ -12,7 +12,9 @@ body:
id: question
attributes:
label: ❓ Question
description: Your question. This can be e.g. questions regarding confusing or unclear behaviour of functions or a question if X can be done using stable-baselines3. Make sure to check out the documentation first.
description: |
Your question. This can be e.g. questions regarding confusing or unclear behaviour of functions or a question if X can be done using stable-baselines3. Make sure to check out the documentation first.
**Important Note: If your question is anything like "Why is my code generating this error?", you must [submit a bug report](https://github.com/DLR-RM/stable-baselines3/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D%3A+bug+title) instead.**
validations:
required: true
- type: checkboxes
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"black",
],
"docs": [
"sphinx",
"sphinx>=5.3,<7.0",
"sphinx-autobuild",
"sphinx-rtd-theme",
# For spelling
Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/common/envs/bit_flipping_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def step(self, action: Union[np.ndarray, int]) -> GymStepReturn:
else:
self.state[action] = 1 - self.state[action]
obs = self._get_obs()
reward = float(self.compute_reward(obs["achieved_goal"], obs["desired_goal"], None))
reward = float(self.compute_reward(obs["achieved_goal"], obs["desired_goal"], None).item())
terminated = reward == 0
self.current_step += 1
# Episode terminate when we reached the goal or the max number of steps
Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/common/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def cast_to_json_serializable(value: Any):
if hasattr(value, "dtype"):
if value.shape == () or len(value) == 1:
# if value is a dimensionless numpy array or of length 1, serialize as a float
return float(value)
return float(value.item())
else:
# otherwise, a value is a numpy array, serialize as a list or nested lists
return value.tolist()
Expand Down