Skip to content

Commit ac81d00

Browse files
authored
Merge pull request #324 from cpnota/develop
v0.9.1
2 parents 9ce894f + f8073e5 commit ac81d00

File tree

190 files changed

+5014
-3118
lines changed

Some content is hidden

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

190 files changed

+5014
-3118
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [3.8, 3.9]
18+
python-version: [3.8, 3.11]
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -25,9 +25,8 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install dependencies
2727
run: |
28-
sudo apt-get install swig
29-
sudo apt-get install unrar
30-
pip install torch~=1.11 --extra-index-url https://download.pytorch.org/whl/cpu
28+
python -m pip install --upgrade pip
29+
pip install torch~=2.0 --extra-index-url https://download.pytorch.org/whl/cpu
3130
make install
3231
- name: Lint code
3332
run: |
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
33

44
name: Upload Python Package
55

66
on:
77
release:
8-
types: [created]
8+
types: [published]
9+
10+
permissions:
11+
contents: read
912

1013
jobs:
1114
deploy:
12-
1315
runs-on: ubuntu-latest
14-
15-
environment: deployment
16-
16+
environment: publish
17+
permissions:
18+
id-token: write
1719
steps:
18-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
1921
- name: Set up Python
20-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v3
2123
with:
22-
python-version: '3.x'
24+
python-version: 3.11
2325
- name: Install dependencies
2426
run: |
2527
python -m pip install --upgrade pip
26-
pip install setuptools wheel twine
27-
- name: Build and publish
28-
env:
29-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
30-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
31-
run: |
32-
python setup.py sdist bdist_wheel
33-
twine upload dist/*
28+
pip install torch~=2.0 --extra-index-url https://download.pytorch.org/whl/cpu
29+
pip install setuptools wheel
30+
make install
31+
- name: Build package
32+
run: make build
33+
- name: Publish package
34+
uses: pypa/gh-action-pypi-publish@release/v1

.readthedocs.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
# .readthedocs.yml
2-
# Read the Docs configuration file
3-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4-
5-
# Required
61
version: 2
72

8-
# Build documentation in the docs/ directory with Sphinx
9-
sphinx:
10-
configuration: docs/source/conf.py
11-
12-
# Build documentation with MkDocs
13-
#mkdocs:
14-
# configuration: mkdocs.yml
3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "3.11"
157

16-
# Optionally build your docs in additional formats such as PDF and ePub
17-
formats: all
18-
19-
# Optionally set the version of Python and requirements required to build your docs
208
python:
21-
version: 3.7
229
install:
2310
- method: pip
2411
path: .
2512
extra_requirements:
2613
- docs
14+
15+
sphinx:
16+
configuration: docs/source/conf.py

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ integration-test:
1111
python -m unittest discover -s integration -p "*test.py"
1212

1313
lint:
14-
flake8 --ignore "E501,E731,E74,E402,F401,W503,E128" all
14+
black --check all benchmarks examples integration setup.py
15+
isort --profile black --check all benchmarks examples integration setup.py
16+
flake8 --select "F401" all benchmarks examples integration setup.py
1517

1618
format:
17-
autopep8 --in-place --aggressive --aggressive --ignore "E501,E731,E74,E402,F401,W503,E128" -r all
19+
black all benchmarks examples integration setup.py
20+
isort --profile black all benchmarks examples integration setup.py
1821

1922
tensorboard:
2023
tensorboard --logdir runs

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ Additionally, we provide an [example project](https://github.com/cpnota/all-exam
2121

2222
## High-Quality Reference Implementations
2323

24-
The `autonomous-learning-library` separates reinforcement learning agents into two modules: `all.agents`, which provides flexible, high-level implementations of many common algorithms which can be adapted to new problems and environments, and `all.presets` which provides specific instansiations of these agents tuned for particular sets of environments, including Atari games, classic control tasks, and PyBullet robotics simulations. Some benchmark results showing results on-par with published results can be found below:
24+
The `autonomous-learning-library` separates reinforcement learning agents into two modules: `all.agents`, which provides flexible, high-level implementations of many common algorithms which can be adapted to new problems and environments, and `all.presets` which provides specific instansiations of these agents tuned for particular sets of environments, including Atari games, classic control tasks, and MuJoCo/Pybullet robotics simulations. Some benchmark results showing results on-par with published results can be found below:
2525

26-
![atari40](benchmarks/atari40.png)
27-
![pybullet](benchmarks/pybullet.png)
26+
![atari40](benchmarks/atari_40m.png)
27+
![atari40](benchmarks/mujoco_v4.png)
28+
![pybullet](benchmarks/pybullet_v0.png)
2829

2930
As of today, `all` contains implementations of the following deep RL algorithms:
3031

all/__init__.py

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
import all.agents
2-
import all.approximation
3-
import all.core
4-
import all.environments
5-
import all.logging
6-
import all.memory
7-
import all.nn
8-
import all.optim
9-
import all.policies
10-
import all.presets
111
from all.core import State, StateArray
122

133
__all__ = [
14-
'agents',
15-
'approximation',
16-
'core',
17-
'environments',
18-
'logging',
19-
'memory',
20-
'nn',
21-
'optim',
22-
'policies',
23-
'presets',
24-
'State',
25-
'StateArray'
4+
"agents",
5+
"approximation",
6+
"core",
7+
"environments",
8+
"logging",
9+
"memory",
10+
"nn",
11+
"optim",
12+
"policies",
13+
"presets",
14+
"State",
15+
"StateArray",
2616
]

all/agents/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from .vqn import VQN, VQNTestAgent
1616
from .vsarsa import VSarsa, VSarsaTestAgent
1717

18-
1918
__all__ = [
2019
# Agent interfaces
2120
"Agent",

all/agents/_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from abc import ABC, abstractmethod
2+
23
from all.optim import Schedulable
34

45

all/agents/_multiagent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from abc import ABC, abstractmethod
2+
23
from all.optim import Schedulable
34

45

all/agents/_parallel_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from abc import ABC, abstractmethod
2+
23
from all.optim import Schedulable
34

45

0 commit comments

Comments
 (0)