Skip to content

Commit

Permalink
Drop python 3.7, add 3.11, update templates (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
araffin authored Jul 3, 2023
1 parent 07f7447 commit 660f2d3
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .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 RL Baselines3 Zoo
description: If you encounter an unexpected behavior, software crash, or other bug.
title: "[Bug]: bug title"
labels: ["bug"]
body:
Expand Down Expand Up @@ -64,7 +64,7 @@ body:
required: true
- label: I have read the [RL Zoo documentation](https://rl-baselines3-zoo.readthedocs.io)
required: true
- label: I have provided a minimal working example to reproduce the bug
- label: I have provided a [minimal and working](https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014) example to reproduce the bug
required: true
- 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.
required: true
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 RL Baselines3 Zoo documentation
description: If you want to improve the documentation by reporting errors, inconsistencies, or missing information.
labels: ["documentation"]
body:
- type: markdown
Expand Down
8 changes: 5 additions & 3 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 RL Baselines3 Zoo
description: If you have a general question about RL Baselines3 Zoo
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 rl-baselines3-zoo. 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/rl-baselines3-zoo/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D%3A+bug+title) instead.**
validations:
required: true
- type: checkboxes
Expand All @@ -26,7 +28,7 @@ body:
required: true
- label: I have read the [RL Zoo documentation](https://rl-baselines3-zoo.readthedocs.io)
required: true
- label: If code there is, it is minimal and working
- label: If code there is, it is [minimal and working](https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014)
required: true
- label: If code there is, it is formatted using the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
required: true
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -39,7 +39,7 @@ jobs:
AutoROM --accept-license --source-file Roms.tar.gz
# cpu version of pytorch - faster to download
pip install torch==1.11.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu
pip install torch==1.13.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu
pip install pybullet==3.2.5
# for v4 MuJoCo envs:
pip install mujoco
Expand All @@ -61,8 +61,8 @@ jobs:
- name: Type check
run: |
make type
# skip mypy type check for python3.7 (last forever for some reason)
if: "!(matrix.python-version == '3.7')"
# skip pytype type check for python 3.11 (not supported)
if: "!(matrix.python-version == '3.11')"
- name: Test with pytest
run: |
make pytest
11 changes: 4 additions & 7 deletions .github/workflows/trained_agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -40,15 +40,12 @@ jobs:
AutoROM --accept-license --source-file Roms.tar.gz
# cpu version of pytorch - faster to download
pip install torch==1.11.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu
pip install torch==1.13.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu
pip install pybullet==3.2.5
pip install -r requirements.txt
# Use headless version
pip install opencv-python-headless
pip install highway-env==1.8.1
# Add support for pickle5 protocol
# TODO: remove me when dropping python 3.7
pip install pickle5
pip install -e .
- name: Check trained agents
run: |
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## Release 2.1.0a0 (WIP)

### Breaking Changes
- Dropped python 3.7 support
- SB3 now requires PyTorch 1.13+

### New Features
- Added python 3.11 support

### Bug fixes

### Documentation

### Other



## Release 2.0.0 (2023-06-22)

**Gymnasium support**
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line.
# For debug: SPHINXOPTS = -nWT --keep-going -vvv
SPHINXOPTS = # -W # make warnings fatal (disabled because of gym in the wrappers)
SPHINXOPTS = -W # make warnings fatal (disabled because of gym in the wrappers)
SPHINXBUILD = sphinx-build
SPHINXPROJ = RLZoo
SOURCEDIR = .
Expand Down
8 changes: 4 additions & 4 deletions docs/conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ channels:
dependencies:
- cpuonly=1.0=0
- pip=22.3.1
- python=3.7
- pytorch=1.11=py3.7_cpu_0
- python=3.8
- pytorch=1.13=py3.8_cpu_0
- pip:
- cloudpickle
- opencv-python-headless
- pandas
- numpy
- matplotlib
- sphinx_autodoc_typehints
- sphinx>=4.2
- sphinx>=5.3,<7.0
- sphinx_rtd_theme>=1.0
- sphinx_copybutton
- sb3-contrib>=1.7.0
- sb3-contrib>=2.0.0
- optuna
- huggingface_sb3>=2.2.1
- rich
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installation
Prerequisites
-------------

RL Zoo requires python 3.7+ and PyTorch >= 1.11
RL Zoo requires python 3.8+ and PyTorch >= 1.13


Minimal Installation
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.ruff]
# Same as Black.
line-length = 127
# Assume Python 3.7
target-version = "py37"
# Assume Python 3.8
target-version = "py38"
# See https://beta.ruff.rs/docs/rules/
select = ["E", "F", "B", "UP", "C90", "RUF"]
# Ignore explicit stacklevel`
Expand Down
2 changes: 1 addition & 1 deletion rl_zoo3/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.1.0a0
2 changes: 1 addition & 1 deletion rl_zoo3/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class HistoryWrapper(gym.Wrapper[np.ndarray, np.ndarray, np.ndarray, np.ndarray]
Stack past observations and actions to give an history to the agent.
:param env:
:param horizon:Number of steps to keep in the history.
:param horizon: Number of steps to keep in the history.
"""

def __init__(self, env: gym.Env, horizon: int = 2):
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
long_description=long_description,
long_description_content_type="text/markdown",
version=__version__,
python_requires=">=3.7",
# PyPI package information.
python_requires=">=3.8",
# PyPI package information.
project_urls={
"Code": "https://github.com/DLR-RM/rl-baselines3-zoo",
Expand All @@ -63,10 +62,10 @@
},
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
)

Expand Down

0 comments on commit 660f2d3

Please sign in to comment.