Skip to content

Commit

Permalink
Merge pull request #131 from automl/gymnasium_migration
Browse files Browse the repository at this point in the history
Gymnasium migration Version Update
  • Loading branch information
TheEimer authored Mar 30, 2023
2 parents 2f316a6 + 70ac4de commit faa1b3a
Show file tree
Hide file tree
Showing 300 changed files with 3,278 additions and 155,922 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exclude =
dacbench/instance_sets,
__pycache___,
dacbench/envs/fast-downward,
dacbench/envs/rl-plan,
algorithms

max-line-length = 88
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: docs

on:
# Manual trigger option in github
# This won't push to github pages where docs are hosted due
# to the gaurded if statement in those steps
workflow_dispatch:

# Trigger on push to these branches
push:
branches:
- main
- gymnasium_migration

# Trigger on a open/push to a PR targeting one of these branches
pull_request:
branches:
- main

env:
name: DACBench

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
id: install
run: |
pip install ".[dev,all,docs]"
- name: Make docs
run: |
make clean
make doc
- name: Pull latest gh-pages
if: (contains(github.ref, 'gymnasium_migration') || contains(github.ref, 'main')) && github.event_name == 'push'
run: |
cd ..
git clone https://github.com/${{ github.repository }}.git --branch gh-pages --single-branch gh-pages
- name: Copy new docs into gh-pages
if: (contains(github.ref, 'gymnasium_migration') || contains(github.ref, 'main')) && github.event_name == 'push'
run: |
branch_name=${GITHUB_REF##*/}
cd ../gh-pages
rm -rf $branch_name
cp -r ../${{ env.name }}/docs/build/html $branch_name
- name: Push to gh-pages
if: (contains(github.ref, 'gymnasium_migration') || contains(github.ref, 'main')) && github.event_name == 'push'
run: |
last_commit=$(git log --pretty=format:"%an: %s")
cd ../gh-pages
branch_name=${GITHUB_REF##*/}
git add $branch_name/
git config --global user.name 'Github Actions'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "$last_commit"
git push
43 changes: 43 additions & 0 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: pre-commit

on:
# Manually triggerable in github
workflow_dispatch:

# When a push occurs on either of these branches
push:
branches-ignore:
- '**'
# branches:
# - main
# - development

# When a push occurs on a PR that targets these branches
pull_request:
branches-ignore:
- '**'
# branches:
# - main
# - development

jobs:
run-all-files:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: |
pre-commit run --all-files
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

name: Run Python Tests
name: tests
on:
push:
branches:
- main
- gymnasium_migration
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -28,13 +28,13 @@ jobs:
path: ./dacbench/envs/rl-plan/fast-downward
key: fast-downward-build
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.6
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e.[dev,example,all]
pip install -e.[dev,all]
- name: Build fast-downward
run: ./dacbench/envs/rl-plan/fast-downward/build.py
- name: Run tests with pytest
Expand Down
19 changes: 2 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,19 @@
__pycache__/
*.py[cod]
.ipynb_checkpoints
.flake8
tox.ini
*.egg-info/

# docs
docs/_build/*
# project spcecific stuff
TODOS.md
builds/

# coverage
coverage_report/*
.coverage
build/

## results, data or temp files written during runs
output/
port_*.txt
tests/data/
test/*.json
test_run
/data/

# pycharm specific stuff
.idea


venv
settings.json
*egg


.vscode/launch.json
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ repos:
rev: stable
hooks:
- id: black
language_version: python3.6
language_version: python3.10
exclude: dacbench/envs/fast-downward
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8

18 changes: 0 additions & 18 deletions .readthedocs.yaml

This file was deleted.

37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 0.2.0

### Interface Update
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**.
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.
Combined they're equal to the old 'done'.
Additonally, the default version of the environments is now available in the gym registry.

### Multi-Agent / Round Robin Control Option
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.
This should provide more freedom in how to solve the problem of scaling up to multiple hyperparameters.

### Package Versions
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!

### Benchmark Changes
The OneLL benchmark is not the Theory benchmark with a similar goal and setup, but a different base problem.
For versioning reasons, we removed ModEA, the same problem should be covered by ModCMA.
We also add a toy benchmark for higher dimensional spaces, the Geometric Benchmark.

### Switches Docs to GitHub.io
The documentation is now hosted on GitHub.io instead of Read the Docs for versioning reasons. The old version should still be accessible, however.


# 0.1.0
### Added Benchmarks
New benchmarks include the ModCMA IOHExperimenter version of ModEA, the OneLL EA benchmark and a toy version of controlling SGD.

### Singularity Containers
For added reproducibility, we provide Singularity recipes for each benchmark. This way they can be run in containers.

## ConfigSpace Integration
Search Spaces can now be defined via ConfigSpace and are then automatically converted to gym spaces.
This should make it easier to recover whcih actions correspond to which hyperparameters.

# 0.0.1
Initial Version
Loading

0 comments on commit faa1b3a

Please sign in to comment.