Skip to content

Commit faa1b3a

Browse files
authored
Merge pull request #131 from automl/gymnasium_migration
Gymnasium migration Version Update
2 parents 2f316a6 + 70ac4de commit faa1b3a

File tree

300 files changed

+3278
-155922
lines changed

Some content is hidden

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

300 files changed

+3278
-155922
lines changed

.flake8

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ exclude =
44
dacbench/instance_sets,
55
__pycache___,
66
dacbench/envs/fast-downward,
7+
dacbench/envs/rl-plan,
78
algorithms
89

910
max-line-length = 88

.github/workflows/docs.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: docs
2+
3+
on:
4+
# Manual trigger option in github
5+
# This won't push to github pages where docs are hosted due
6+
# to the gaurded if statement in those steps
7+
workflow_dispatch:
8+
9+
# Trigger on push to these branches
10+
push:
11+
branches:
12+
- main
13+
- gymnasium_migration
14+
15+
# Trigger on a open/push to a PR targeting one of these branches
16+
pull_request:
17+
branches:
18+
- main
19+
20+
env:
21+
name: DACBench
22+
23+
jobs:
24+
build-and-deploy:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
30+
- name: Setup Python
31+
uses: actions/setup-python@v4
32+
with:
33+
python-version: "3.10"
34+
35+
- name: Install dependencies
36+
id: install
37+
run: |
38+
pip install ".[dev,all,docs]"
39+
40+
- name: Make docs
41+
run: |
42+
make clean
43+
make doc
44+
45+
- name: Pull latest gh-pages
46+
if: (contains(github.ref, 'gymnasium_migration') || contains(github.ref, 'main')) && github.event_name == 'push'
47+
run: |
48+
cd ..
49+
git clone https://github.com/${{ github.repository }}.git --branch gh-pages --single-branch gh-pages
50+
51+
- name: Copy new docs into gh-pages
52+
if: (contains(github.ref, 'gymnasium_migration') || contains(github.ref, 'main')) && github.event_name == 'push'
53+
run: |
54+
branch_name=${GITHUB_REF##*/}
55+
cd ../gh-pages
56+
rm -rf $branch_name
57+
cp -r ../${{ env.name }}/docs/build/html $branch_name
58+
59+
60+
- name: Push to gh-pages
61+
if: (contains(github.ref, 'gymnasium_migration') || contains(github.ref, 'main')) && github.event_name == 'push'
62+
run: |
63+
last_commit=$(git log --pretty=format:"%an: %s")
64+
cd ../gh-pages
65+
branch_name=${GITHUB_REF##*/}
66+
git add $branch_name/
67+
git config --global user.name 'Github Actions'
68+
git config --global user.email 'not@mail.com'
69+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
70+
git commit -am "$last_commit"
71+
git push

.github/workflows/pre_commit.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: pre-commit
2+
3+
on:
4+
# Manually triggerable in github
5+
workflow_dispatch:
6+
7+
# When a push occurs on either of these branches
8+
push:
9+
branches-ignore:
10+
- '**'
11+
# branches:
12+
# - main
13+
# - development
14+
15+
# When a push occurs on a PR that targets these branches
16+
pull_request:
17+
branches-ignore:
18+
- '**'
19+
# branches:
20+
# - main
21+
# - development
22+
23+
jobs:
24+
run-all-files:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
with:
30+
submodules: recursive
31+
32+
- name: Setup Python 3.10
33+
uses: actions/setup-python@v2
34+
with:
35+
python-version: 3.10
36+
37+
- name: Install pre-commit
38+
run: |
39+
pip install pre-commit
40+
pre-commit install
41+
- name: Run pre-commit
42+
run: |
43+
pre-commit run --all-files

.github/workflows/run-python-tests.yml .github/workflows/pytest.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
2-
name: Run Python Tests
1+
name: tests
32
on:
43
push:
54
branches:
65
- main
6+
- gymnasium_migration
77
pull_request:
88
branches:
99
- main
1010

1111
jobs:
1212
build:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-18.04
1414
steps:
1515
- uses: actions/checkout@v2
1616
with:
@@ -28,13 +28,13 @@ jobs:
2828
path: ./dacbench/envs/rl-plan/fast-downward
2929
key: fast-downward-build
3030
- name: Install Python 3
31-
uses: actions/setup-python@v1
31+
uses: actions/setup-python@v4
3232
with:
33-
python-version: 3.6
33+
python-version: '3.10'
3434
- name: Install dependencies
3535
run: |
3636
python -m pip install --upgrade pip
37-
pip install -e.[dev,example,all]
37+
pip install -e.[dev,all]
3838
- name: Build fast-downward
3939
run: ./dacbench/envs/rl-plan/fast-downward/build.py
4040
- name: Run tests with pytest

.gitignore

+2-17
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,19 @@
22
__pycache__/
33
*.py[cod]
44
.ipynb_checkpoints
5-
.flake8
5+
tox.ini
66
*.egg-info/
77

8-
# docs
9-
docs/_build/*
108
# project spcecific stuff
119
TODOS.md
1210
builds/
13-
14-
# coverage
15-
coverage_report/*
16-
.coverage
11+
build/
1712

1813
## results, data or temp files written during runs
1914
output/
2015
port_*.txt
2116
tests/data/
2217
test/*.json
23-
test_run
24-
/data/
2518

2619
# pycharm specific stuff
2720
.idea
28-
29-
30-
venv
31-
settings.json
32-
*egg
33-
34-
35-
.vscode/launch.json

.pre-commit-config.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ repos:
33
rev: stable
44
hooks:
55
- id: black
6-
language_version: python3.6
6+
language_version: python3.10
77
exclude: dacbench/envs/fast-downward
88
- repo: https://gitlab.com/pycqa/flake8
99
rev: 3.8.4
1010
hooks:
1111
- id: flake8
12-

.readthedocs.yaml

-18
This file was deleted.

CHANGELOG.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# 0.2.0
2+
3+
### Interface Update
4+
The main change in this version is going from OpenAI's gym to the newer gymnasium version. The outward change is slight, but this interface is now **incompatible with version 0.1.0**.
5+
To adapt to this version, you'll mainly have to replace instances of 'done' for termination with two variables: 'terminated' indication algorithm termination and 'truncated' indicating a timeout.
6+
Combined they're equal to the old 'done'.
7+
Additonally, the default version of the environments is now available in the gym registry.
8+
9+
### Multi-Agent / Round Robin Control Option
10+
We added more options for controlling several hyperparameters at once. Using the PettingZoo API, users can now select which hyperparameters to control and use a typical Multi-Agent RL interface to do it.
11+
This should provide more freedom in how to solve the problem of scaling up to multiple hyperparameters.
12+
13+
### Package Versions
14+
We updated all our dependencies for this release. Please note that this will likely influence benchmark behaviour, so **do not** directly compare performance of version 0.2.0 with 0.1.0!
15+
16+
### Benchmark Changes
17+
The OneLL benchmark is not the Theory benchmark with a similar goal and setup, but a different base problem.
18+
For versioning reasons, we removed ModEA, the same problem should be covered by ModCMA.
19+
We also add a toy benchmark for higher dimensional spaces, the Geometric Benchmark.
20+
21+
### Switches Docs to GitHub.io
22+
The documentation is now hosted on GitHub.io instead of Read the Docs for versioning reasons. The old version should still be accessible, however.
23+
24+
25+
# 0.1.0
26+
### Added Benchmarks
27+
New benchmarks include the ModCMA IOHExperimenter version of ModEA, the OneLL EA benchmark and a toy version of controlling SGD.
28+
29+
### Singularity Containers
30+
For added reproducibility, we provide Singularity recipes for each benchmark. This way they can be run in containers.
31+
32+
## ConfigSpace Integration
33+
Search Spaces can now be defined via ConfigSpace and are then automatically converted to gym spaces.
34+
This should make it easier to recover whcih actions correspond to which hyperparameters.
35+
36+
# 0.0.1
37+
Initial Version

0 commit comments

Comments
 (0)