Skip to content

Commit 289d324

Browse files
committed
Merge branch 'development' into gymnax
2 parents 0bba185 + 8c43a58 commit 289d324

File tree

437 files changed

+14698
-5032
lines changed

Some content is hidden

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

437 files changed

+14698
-5032
lines changed

.codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ coverage:
2525
# This encourages small PR's as they are easier to test.
2626
patch:
2727
default:
28-
target: 90%
28+
target: 10%
2929
if_not_found: failure
30-
if_ci_failed: error
30+
if_ci_failed: failure
3131

3232
# We upload additional information on branching with pytest-cov `--cov-branch`
3333
# This information can be used by codecov.com to increase analysis of code

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ extend-ignore =
1010
E203
1111
# No lambdas — too strict
1212
E731
13+
E722
14+
F405
15+
F403

.github/workflows/dist.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ on:
1010
- main
1111
- development
1212

13-
# When a push occurs on a PR that targets these branches
13+
# Trigger on open/push to a PR targeting one of these branches
1414
pull_request:
15+
types:
16+
- opened
17+
- synchronize
18+
- reopened
19+
- ready_for_review
1520
branches:
1621
- main
1722
- development
1823

1924
jobs:
2025
dist:
26+
if: ${{ !github.event.pull_request.draft }}
2127
runs-on: ubuntu-latest
2228

2329
steps:
@@ -38,7 +44,7 @@ jobs:
3844
- name: Twine check
3945
run: |
4046
pip install twine
41-
last_dist=$(ls -t dist/ContextuaRL-*.tar.gz | head -n 1)
47+
last_dist=$(ls -t dist/carl-*.tar.gz | head -n 1)
4248
twine_output=`twine check "$last_dist"`
4349
if [[ "$twine_output" != "Checking $last_dist: PASSED" ]]
4450
then
@@ -49,7 +55,7 @@ jobs:
4955
5056
- name: Install dist
5157
run: |
52-
last_dist=$(ls -t dist/ContextuaRL-*.tar.gz | head -n 1)
58+
last_dist=$(ls -t dist/carl-*.tar.gz | head -n 1)
5359
pip install $last_dist
5460
5561
- name: PEP 561 Compliance

.github/workflows/docs.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
14+
# Trigger on a open/push to a PR targeting one of these branches
15+
pull_request:
16+
branches:
17+
- main
18+
19+
env:
20+
name: CARL
21+
22+
jobs:
23+
build-and-deploy:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Setup Python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: "3.9"
33+
34+
- name: Install dependencies
35+
run: |
36+
pip install ".[docs]"
37+
- name: Make docs
38+
run: |
39+
make clean
40+
make doc
41+
- name: Pull latest gh_pages
42+
if: (contains(github.ref, 'version_0.2.0') || contains(github.ref, 'main')) && github.event_name == 'push'
43+
run: |
44+
cd ..
45+
git clone https://github.com/${{ github.repository }}.git --branch gh_pages --single-branch gh_pages
46+
- name: Copy new docs into gh_pages
47+
if: (contains(github.ref, 'version_0.2.0') || contains(github.ref, 'main')) && github.event_name == 'push'
48+
run: |
49+
branch_name=${GITHUB_REF##*/}
50+
cd ../gh_pages
51+
rm -rf $branch_name
52+
cp -r ../${{ env.name }}/docs/build/html $branch_name
53+
- name: Push to gh_pages
54+
if: (contains(github.ref, 'version_0.2.0') || contains(github.ref, 'main')) && github.event_name == 'push'
55+
run: |
56+
last_commit=$(git log --pretty=format:"%an: %s")
57+
cd ../gh_pages
58+
branch_name=${GITHUB_REF##*/}
59+
git add $branch_name/
60+
git config --global user.name 'Github Actions'
61+
git config --global user.email '[email protected]'
62+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
63+
git commit -am "$last_commit"
64+
git push

.github/workflows/precommit.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ on:
1212

1313
# When a push occurs on a PR that targets these branches
1414
pull_request:
15+
types:
16+
- opened
17+
- synchronize
18+
- reopened
19+
- ready_for_review
1520
branches:
1621
- main
1722
- development
1823

1924
jobs:
2025
run-all-files:
26+
if : ${{ !github.event.pull_request.draft }}
2127
runs-on: ubuntu-latest
2228
steps:
2329
- uses: actions/checkout@v2

.github/workflows/tests.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212

1313
# When a push occurs on a PR that targets these branches
1414
pull_request:
15+
types:
16+
- opened
17+
- synchronize
18+
- reopened
19+
- ready_for_review
1520
branches:
1621
- main
1722
- development
@@ -36,6 +41,7 @@ jobs:
3641
ubuntu:
3742

3843
name: ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.kind }}
44+
if: ${{ !github.event.pull_request.draft }}
3945
runs-on: ${{ matrix.os }}
4046

4147
strategy:
@@ -85,25 +91,26 @@ jobs:
8591
# Miniconda is available in $CONDA env var
8692
$CONDA/bin/conda create -n testenv --yes pip wheel gxx_linux-64 gcc_linux-64 python=${{ matrix.python-version }}
8793
$CONDA/envs/testenv/bin/python3 -m pip install --upgrade pip
88-
$CONDA/envs/testenv/bin/pip3 install -e .[dev,dm_control]
94+
$CONDA/envs/testenv/bin/pip3 install -e ".[dev,box2d,brax,dm_control,mario]"
8995
9096
- name: Source install
9197
if: matrix.kind == 'source'
9298
run: |
9399
python -m pip install --upgrade pip
94-
pip install -e .[dev,dm_control]
100+
pip install -e ".[dev,box2d,brax,dm_control,mario]"
95101
96102
- name: Dist install
97103
if: matrix.kind == 'dist'
98104
run: |
99105
python -m pip install --upgrade pip
100106
python setup.py sdist
101-
last_dist=$(ls -t dist/ContextuaRL-*.tar.gz | head -n 1)
102-
pip install $last_dist[dev,dm_control]
107+
last_dist=$(ls -t dist/carl-*.tar.gz | head -n 1)
108+
pip install $last_dist[dev,box2d,brax,dm_control,mario]
103109
104110
- name: Tests
105111
timeout-minutes: 60
106112
run: |
113+
echo "Running all tests..."
107114
if [[ ${{ matrix.kind }} == 'conda' ]]; then
108115
PYTHON=$CONDA/envs/testenv/bin/python3
109116
export PATH="$CONDA/envs/testenv/bin:$PATH"

.gitignore

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@ CARL.egg-info
1616
carl.egg-info
1717
.mypy_cache
1818
.pytest_cache
19-
.coverage
19+
.coverage*
2020
exp_sweep
2121
multirun
2222
outputs
23+
testvenv
24+
*.egg-info
2325
runs
24-
*.tex
25-
*.png
2626
*.pdf
27-
*.csv
28-
*.json
2927
*.pickle
30-
*.egg-info
31-
*code-workspace
28+
*.ipynb_checkpoints
29+
*optgap*
30+
*smac3*
31+
*.json
32+
generated
33+
core
34+
*.tex
35+
build
36+
target

.gitmodules

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
[submodule "src/envs/rna/learna"]
2-
path = src/envs/rna/learna
3-
url = https://github.com/automl/learna.git
4-
[submodule "src/envs/mario/TOAD-GUI"]
5-
path = src/envs/mario/TOAD-GUI
1+
[submodule "carl/envs/mario/TOAD-GUI"]
2+
path = carl/envs/mario/TOAD-GUI
63
url = https://github.com/Mawiszus/TOAD-GUI
7-
[submodule "src/envs/mario/Mario-AI-Framework"]
8-
path = src/envs/mario/Mario-AI-Framework
4+
[submodule "carl/envs/mario/Mario-AI-Framework"]
5+
path = carl/envs/mario/Mario-AI-Framework
96
url = https://github.com/frederikschubert/Mario-AI-Framework

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ repos:
4343
always_run: false
4444
additional_dependencies: ["toml"] # Needed to parse pyproject.toml
4545

46-
- repo: https://github.com/pre-commit/mirrors-mypy
47-
rev: v0.930
48-
hooks:
49-
- id: mypy
50-
name: mypy carl
51-
files: carl/.*
52-
5346
- repo: https://github.com/pycqa/flake8
5447
rev: 6.0.0
5548
hooks:

CITATION.bib

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
@inproceedings { BenEim2021a,
2-
author = {Carolin Benjamins and Theresa Eimer and Frederik Schubert and André Biedenkapp and Bodo Rosenhahn and Frank Hutter and Marius Lindauer},
3-
title = {CARL: A Benchmark for Contextual and Adaptive Reinforcement Learning},
4-
booktitle = {NeurIPS 2021 Workshop on Ecological Theory of Reinforcement Learning},
5-
year = {2021},
6-
month = dec
1+
@inproceedings { BenEim2023a,
2+
author = {Carolin Benjamins and
3+
Theresa Eimer and
4+
Frederik Schubert and
5+
Aditya Mohan and
6+
Sebastian Döhler and
7+
André Biedenkapp and
8+
Bodo Rosenhahn and
9+
Frank Hutter and
10+
Marius Lindauer},
11+
title = {Contextualize Me - The Case for Context in Reinforcement Learning},
12+
journal = {Transactions on Machine Learning Research},
13+
year = {2023},
714
}

0 commit comments

Comments
 (0)