Skip to content

Commit

Permalink
Fix example in README.md (#1830)
Browse files Browse the repository at this point in the history
* Fix example in README.md

* Update changelog

---------

Co-authored-by: Antonin Raffin <[email protected]>
  • Loading branch information
marekm4 and araffin authored Feb 13, 2024
1 parent 620e58e commit beee427
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ import gymnasium as gym

from stable_baselines3 import PPO

env = gym.make("CartPole-v1")
env = gym.make("CartPole-v1", render_mode="human")

model = PPO("MlpPolicy", env, verbose=1)
model.learn(total_timesteps=10_000)
Expand Down
2 changes: 2 additions & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Documentation:
- Updated callback code example
- Updated export to ONNX documentation, it is now much simpler to export SB3 models with newer ONNX Opset!
- Added video link to "Practical Tips for Reliable Reinforcement Learning" video
- Added ``render_mode="human"`` in the README example (@marekm4)

Release 2.2.1 (2023-11-17)
--------------------------
Expand Down Expand Up @@ -1561,3 +1562,4 @@ And all the contributors:
@anand-bala @hughperkins @sidney-tio @AlexPasqua @dominicgkerr @Akhilez @Rocamonde @tobirohrer @ZikangXiong @ReHoss
@DavyMorgan @luizapozzobon @Bonifatius94 @theSquaredError @harveybellini @DavyMorgan @FieteO @jonasreiher @npit @WeberSamuel @troiganto
@lutogniew @lbergmann1 @lukashass @BertrandDecoster @pseudo-rnd-thoughts @stefanbschneider @kyle-he @PatrickHelm @corentinlger
@marekm4
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from stable_baselines3 import PPO
env = gymnasium.make("CartPole-v1")
env = gymnasium.make("CartPole-v1", render_mode="human")
model = PPO("MlpPolicy", env, verbose=1)
model.learn(total_timesteps=10_000)
Expand Down

0 comments on commit beee427

Please sign in to comment.