Skip to content

Commit 248f082

Browse files
authored
Bump min PyTorch version (#855)
1 parent 16703b1 commit 248f082

7 files changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip
3030
# cpu version of pytorch
31-
pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
31+
pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html
3232
pip install .[extra,tests,docs]
3333
# Use headless version
3434
pip install opencv-python-headless

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Documentation is available online: [https://stable-baselines3.readthedocs.io/](h
5151

5252
## Integrations
5353

54-
Stable-Baselines3 has some integration with other libraries/services like Weights & Biases for experiment tracking or Hugging Face for storing/sharing trained models. You can find out more in the [dedicated section](https://stable-baselines3.readthedocs.io/en/master/guide/integrations.html) of the documentation.
54+
Stable-Baselines3 has some integration with other libraries/services like Weights & Biases for experiment tracking or Hugging Face for storing/sharing trained models. You can find out more in the [dedicated section](https://stable-baselines3.readthedocs.io/en/master/guide/integrations.html) of the documentation.
5555

5656

5757
## RL Baselines3 Zoo: A Training Framework for Stable Baselines3 Reinforcement Learning Agents
@@ -84,7 +84,7 @@ Documentation is available online: [https://sb3-contrib.readthedocs.io/](https:/
8484

8585
## Installation
8686

87-
**Note:** Stable-Baselines3 supports PyTorch >= 1.8.1.
87+
**Note:** Stable-Baselines3 supports PyTorch >= 1.11
8888

8989
### Prerequisites
9090
Stable Baselines3 requires Python 3.7+.

docs/guide/custom_env.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Then you can define and train a RL agent with:
6161
model = A2C('CnnPolicy', env).learn(total_timesteps=1000)
6262
6363
64-
To check that your environment follows the gym interface, please use:
64+
To check that your environment follows the Gym interface that SB3 supports, please use:
6565

6666
.. code-block:: python
6767
@@ -71,11 +71,11 @@ To check that your environment follows the gym interface, please use:
7171
# It will check your custom environment and output additional warnings if needed
7272
check_env(env)
7373
74-
74+
Gym also have its own `env checker <https://www.gymlibrary.ml/content/api/#checking-api-conformity>`_ but it checks a superset of what SB3 supports (SB3 does not support all Gym features).
7575

7676
We have created a `colab notebook <https://colab.research.google.com/github/araffin/rl-tutorial-jnrr19/blob/master/5_custom_gym_env.ipynb>`_ for a concrete example on creating a custom environment along with an example of using it with Stable-Baselines3 interface.
7777

78-
Alternatively, you may look at OpenAI Gym `built-in environments <https://gym.openai.com/docs/#available-environments>`_. However, the readers are cautioned as per OpenAI Gym `official wiki <https://github.com/openai/gym/wiki/FAQ>`_, its advised not to customize their built-in environments. It is better to copy and create new ones if you need to modify them.
78+
Alternatively, you may look at OpenAI Gym `built-in environments <https://www.gymlibrary.ml/>`_. However, the readers are cautioned as per OpenAI Gym `official wiki <https://github.com/openai/gym/wiki/FAQ>`_, its advised not to customize their built-in environments. It is better to copy and create new ones if you need to modify them.
7979

8080
Optionally, you can also register the environment with gym, that will allow you to create the RL agent in one line (and use ``gym.make()`` to instantiate the env):
8181

docs/guide/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Installation
66
Prerequisites
77
-------------
88

9-
Stable-Baselines3 requires python 3.7+ and PyTorch >= 1.8.1.
9+
Stable-Baselines3 requires python 3.7+ and PyTorch >= 1.11
1010

1111
Windows 10
1212
~~~~~~~~~~

docs/misc/changelog.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ Changelog
44
==========
55

66

7-
Release 1.5.1a2(WIP)
7+
Release 1.5.1a3 (WIP)
88
---------------------------
99

1010
Breaking Changes:
1111
^^^^^^^^^^^^^^^^^
1212
- Changed the way policy "aliases" are handled ("MlpPolicy", "CnnPolicy", ...), removing the former
1313
``register_policy`` helper, ``policy_base`` parameter and using ``policy_aliases`` static attributes instead (@Gregwar)
14+
- SB3 now requires PyTorch >= 1.11
1415

1516
New Features:
1617
^^^^^^^^^^^^^
@@ -31,6 +32,7 @@ Others:
3132

3233
Documentation:
3334
^^^^^^^^^^^^^^
35+
- Added link to gym doc and gym env checker
3436

3537

3638
Release 1.5.0 (2022-03-25)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
install_requires=[
7676
"gym==0.21", # Fixed version due to breaking changes in 0.22
7777
"numpy",
78-
"torch>=1.8.1",
78+
"torch>=1.11",
7979
# For saving models
8080
"cloudpickle",
8181
# For reading logs

stable_baselines3/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.1a2
1+
1.5.1a3

0 commit comments

Comments
 (0)