Skip to content

Commit cc20f5a

Browse files
authored
Switch to Markdown documentation (MyST parser) (#2219)
* Switch to mardown documentation (MyST parser) * Update requirements * Doc fix following copilot suggestions
1 parent 5675204 commit cc20f5a

Some content is hidden

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

80 files changed

+8094
-8520
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
2121
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
2222
- [ ] I've read the [CONTRIBUTION](https://github.com/DLR-RM/stable-baselines3/blob/master/CONTRIBUTING.md) guide (**required**)
23-
- [ ] I have updated the changelog accordingly (**required**).
23+
- [ ] I have updated the changelog accordingly (`docs/misc/changelog.md`) (**required**).
2424
- [ ] My change requires a change to the documentation.
2525
- [ ] I have updated the tests accordingly (*required for a bug fix or a new feature*).
2626
- [ ] I have updated the documentation accordingly.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ make spelling
112112

113113
## Changelog and Documentation
114114

115-
Please do not forget to update the changelog (`docs/misc/changelog.rst`) and add documentation if needed.
115+
Please do not forget to update the changelog (`docs/misc/changelog.md`) and add documentation if needed.
116116
You should add your username next to each changelog entry that you added. If this is your first contribution, please add your username at the bottom too.
117117
A README is present in the `docs/` folder for instructions on how to build the documentation.
118118

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Stable Baselines3 Documentation
1+
# Stable Baselines3 Documentation
22

33
This folder contains documentation for the RL baselines.
44

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
.. _atari_wrapper:
1+
(atari-wrapper)=
22

3-
Atari Wrappers
4-
==============
3+
# Atari Wrappers
54

5+
```{eval-rst}
66
.. automodule:: stable_baselines3.common.atari_wrappers
77
:members:
8+
```

docs/common/distributions.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
(distributions)=
2+
3+
# Probability Distributions
4+
5+
Probability distributions used for the different action spaces:
6+
7+
- `CategoricalDistribution` -> Discrete
8+
- `DiagGaussianDistribution` -> Box (continuous actions)
9+
- `StateDependentNoiseDistribution` -> Box (continuous actions) when `use_sde=True`
10+
11+
% - ``MultiCategoricalDistribution`` -> MultiDiscrete
12+
13+
% - ``BernoulliDistribution`` -> MultiBinary
14+
15+
The policy networks output parameters for the distributions (named `flat` in the methods).
16+
Actions are then sampled from those distributions.
17+
18+
For instance, in the case of discrete actions. The policy network outputs probability
19+
of taking each action. The `CategoricalDistribution` allows sampling from it,
20+
computes the entropy, the log probability (`log_prob`) and backpropagate the gradient.
21+
22+
In the case of continuous actions, a Gaussian distribution is used. The policy network outputs
23+
mean and (log) std of the distribution (assumed to be a `DiagGaussianDistribution`).
24+
25+
```{eval-rst}
26+
.. automodule:: stable_baselines3.common.distributions
27+
:members:
28+
```

docs/common/distributions.rst

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
.. _env_checker:
1+
(env-checker)=
22

3-
Gym Environment Checker
4-
========================
3+
# Gym Environment Checker
54

5+
```{eval-rst}
66
.. automodule:: stable_baselines3.common.env_checker
77
:members:
8+
```
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
.. _env_util:
1+
(env-util)=
22

3-
Environments Utils
4-
=========================
3+
# Environments Utils
54

5+
```{eval-rst}
66
.. automodule:: stable_baselines3.common.env_util
77
:members:
8+
```
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
.. _envs:
1+
(envs)=
22

3+
```{eval-rst}
34
.. automodule:: stable_baselines3.common.envs
45
56
7+
```
68

7-
Custom Environments
8-
===================
9+
# Custom Environments
910

1011
Those environments were created for testing purposes.
1112

13+
## BitFlippingEnv
1214

13-
BitFlippingEnv
14-
--------------
15-
15+
```{eval-rst}
1616
.. autoclass:: BitFlippingEnv
1717
:members:
1818
19+
```
1920

20-
SimpleMultiObsEnv
21-
-----------------
21+
## SimpleMultiObsEnv
2222

23+
```{eval-rst}
2324
.. autoclass:: SimpleMultiObsEnv
24-
:members:
25+
:members:
26+
```
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
.. _eval:
1+
(eval)=
22

3-
Evaluation Helper
4-
=================
3+
# Evaluation Helper
54

5+
```{eval-rst}
66
.. automodule:: stable_baselines3.common.evaluation
77
:members:
8+
```

0 commit comments

Comments
 (0)