Skip to content

Version 0.3.0 #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 87 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
61038c5
Version merging modcma and cma_step_size in config
mschween Sep 28, 2023
d8d5345
mixed type action space support
TheEimer Oct 6, 2023
8d3862e
minor: remove todo tag
TheEimer Oct 6, 2023
bca0fed
Corrected typo in "adaptation"
mschween Oct 16, 2023
f24a652
Step size can be used
mschween Oct 16, 2023
2bfd79f
Fixed Tests
mschween Oct 19, 2023
5c0d075
Corrected counter
mschween Oct 23, 2023
67b0963
Enable options in reset for instance specification
TheEimer Oct 25, 2023
9a08ce9
Added usage of multiple x values at the same time
mschween Oct 30, 2023
8531e4f
ppo example with cleanrl
TheEimer Oct 30, 2023
81f6d8e
New sgd, based on automl-private and
mschween Nov 27, 2023
7389197
Reduced code, fixed crash penalty
mschween Dec 4, 2023
a184f17
Cleanup, delete unnecessary cma files
mschween Dec 4, 2023
4e73311
Merge branch 'ToySDG_add_S' into development
mschween Dec 4, 2023
d10b306
removed old cma & fixed runner
TheEimer Dec 7, 2023
221a5b5
some pre-commit fixes
TheEimer Dec 7, 2023
ef45c4f
fix tests 1: wrappers
TheEimer Dec 7, 2023
61ff427
fix tests 2: most are running again
TheEimer Dec 7, 2023
2b0ad8b
Working generator, fixed test()
mschween Dec 11, 2023
4feefa4
fix runner path
TheEimer Dec 11, 2023
878e4d8
fix logger paths
TheEimer Dec 11, 2023
43c982e
fix logger paths
TheEimer Dec 11, 2023
07a8bdb
fix logger paths - for real
TheEimer Dec 11, 2023
063cfe4
Added default reward and state functions
mschween Dec 18, 2023
af0b9c5
Sgd benchmark cleanup
mschween Dec 18, 2023
86ca852
Delete old sgd
mschween Dec 18, 2023
a02146f
Fix sgd deletion
mschween Dec 18, 2023
7d7e4de
Fixed Test case
mschween Dec 18, 2023
86d7d5d
Added momentum to sgd benchmark
mschween Jan 4, 2024
70a7a1b
fix: no none seeds
TheEimer Jan 4, 2024
e2052aa
fix: remove legacy step in cma
TheEimer Jan 23, 2024
88ded2d
fix: representation bug in cma
TheEimer Jan 23, 2024
29d0abc
Add noisy quadratic to toysgd
mschween Feb 12, 2024
d237d77
Fix pre-commit issues
mschween Feb 12, 2024
9292e1e
Fixed Sgd Tests
mschween Feb 14, 2024
7b2993b
Fixed cma Test
mschween Feb 14, 2024
9d23864
Fix test
mschween Feb 14, 2024
7542593
Add inits, so all tests are recognized from VSC
mschween Feb 19, 2024
7cf3e84
move pre-commit to ruff
TheEimer Feb 19, 2024
fb70408
linting/formatting in ruff
TheEimer Feb 19, 2024
cd7c481
fix ruff checks
TheEimer Feb 19, 2024
618e8d1
correct ruff config
TheEimer Feb 19, 2024
2776834
Merge branch 'development' of github.com:automl/DACBench into develop…
mschween Feb 19, 2024
ef48b1d
Fixing ruff linter errrors
mschween Feb 27, 2024
3522822
Fixing of more ruff errors
mschween Feb 27, 2024
4fcf14c
fix: remove double seeding
TheEimer May 13, 2024
96fd27a
sgd changes and some theory fixing
TheEimer Jun 20, 2024
621e0a4
More bugfixes
TheEimer Jun 20, 2024
b474a53
Better standard architecture in SGD
TheEimer Jun 21, 2024
06de33e
Update sgd_benchmark.py
TheEimer Jun 26, 2024
af5b869
add softmax layer to torchhub models
TheEimer Jul 16, 2024
c9ca47a
normalization option for cma
TheEimer Jul 29, 2024
a2ef364
instance set location options
TheEimer Jul 29, 2024
7afa010
Seed torch manually
TheEimer Aug 6, 2024
50bae91
Remove strange data loading
TheEimer Aug 6, 2024
cee4385
Update sgd.py
TheEimer Aug 14, 2024
e8b037d
Update sgd.py
TheEimer Aug 14, 2024
eb3fbf8
updated gitignore
TheEimer Sep 20, 2024
05c7811
Instance rework
TheEimer Sep 25, 2024
2be4d34
delete accidentally included cifar
TheEimer Sep 25, 2024
79ffb96
update gitignore
TheEimer Sep 25, 2024
9797d15
readme update
TheEimer Sep 25, 2024
0f3f878
remove issue-project linking workflow
TheEimer Sep 25, 2024
c61b462
correct workflow badges link
TheEimer Sep 25, 2024
8b57141
Update test workflow config
TheEimer Sep 25, 2024
f2181fa
Use uv in test workflow
TheEimer Sep 25, 2024
b6536c7
Action debugging
TheEimer Sep 25, 2024
fde2a35
Further action debugging
TheEimer Sep 25, 2024
e7bf7b3
Remove duplicated dependecy install
TheEimer Sep 25, 2024
e9366f1
action debugging
TheEimer Sep 25, 2024
3dd592c
request uv python in workflow
TheEimer Sep 25, 2024
49ce98c
update workflows
TheEimer Sep 25, 2024
bb53e52
correct python version
TheEimer Sep 25, 2024
955aea5
make utils findable
TheEimer Sep 25, 2024
515be4c
Update docs
TheEimer Sep 25, 2024
73c4081
fix index
TheEimer Sep 25, 2024
f756430
fix documentation type hint issues
TheEimer Sep 25, 2024
b267cc8
doc workflow for dev branch
TheEimer Sep 25, 2024
f5d9a03
updated gitignore
TheEimer Sep 27, 2024
d68f099
example notebooks per benchmark
TheEimer Sep 27, 2024
1369519
Adapt notebook
TheEimer Sep 27, 2024
0c8a23a
fix challenge reference in test
TheEimer Sep 27, 2024
8b9abe1
fix fd paths
TheEimer Sep 30, 2024
f3ee4ce
add cmake to test
TheEimer Sep 30, 2024
aab0ce4
unlink fd everywhere
TheEimer Sep 30, 2024
30b3015
remove fd imports
TheEimer Sep 30, 2024
7e955f5
version update
TheEimer Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .flake8

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ on:
push:
branches:
- main
- development

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

env:
name: DACBench
Expand Down Expand Up @@ -42,13 +44,13 @@ jobs:
make doc

- name: Pull latest gh-pages
if: contains(github.ref, 'main') && github.event_name == 'push'
if: 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, 'main') && github.event_name == 'push'
if: github.event_name == 'push'
run: |
branch_name=${GITHUB_REF##*/}
cd ../gh-pages
Expand All @@ -57,7 +59,7 @@ jobs:


- name: Push to gh-pages
if: contains(github.ref, 'main') && github.event_name == 'push'
if: github.event_name == 'push'
run: |
last_commit=$(git log --pretty=format:"%an: %s")
cd ../gh-pages
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/main.yml

This file was deleted.

22 changes: 9 additions & 13 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,29 @@ on:

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

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

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

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

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

- name: Install pre-commit
run: |
Expand Down
59 changes: 18 additions & 41 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,35 @@
name: tests
on:
workflow_dispatch:
push:
branches:
- main
- development
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-18.04
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Cache MNIST
id: cache-mnist
uses: actions/cache@v2
with:
path: ./data/MNIST
key: mnist
- name: Cache Fast-downward build
id: cache-fast-downward-build
uses: actions/cache@v2
with:
path: ./dacbench/envs/rl-plan/fast-downward
key: fast-downward-build
- name: Install Python 3
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install -e.[dev,all]
- name: Build fast-downward
run: ./dacbench/envs/rl-plan/fast-downward/build.py
- name: Run tests with pytest
run: coverage run -m pytest --html=test-report.html
- name: Run coverage
python -m pip install uv
uv venv
- name: Activate virtualenv
run: |
coverage report
coverage html
- name: Archive code coverage results
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: code-coverage-report
path: coverage_report
- name: Archive test report
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: test-report
path: |
test-report.html
assets
. .venv/bin/activate
which python
echo PATH=$PATH >> $GITHUB_ENV
- name: Install dependencies
run: |
git submodule update --init --recursive
uv pip install -e ".[dev, docs, all, example]"
- name: Run tests with pytest
run: /home/runner/work/DACBench/DACBench/.venv/bin/python -m pytest tests
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,15 @@ port_*.txt
tests/data/
test/*.json

# pycharm specific stuff
# pycharm/vscode specific stuff
.idea
.vscode/

#datasets for sgd
*MNIST/raw*
*raw*
*cifar-10-batches-py*
*cifar*.tar.gz

# venvs
*.lock*
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "dacbench/envs/rl-plan"]
path = dacbench/envs/rl-plan
url = https://github.com/speckdavid/rl-plan.git
[submodule "docs/_themes/sphinx_rtd_theme"]
path = docs/_themes/sphinx_rtd_theme
url = https://github.com/readthedocs/sphinx_rtd_theme.git
19 changes: 9 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.10
exclude: dacbench/envs/fast-downward
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.2
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# 0.3.0

### Instance Specification
Instances for most benchmarks now have a dataclass Type instead of being a simple list. Additionally, the corresponding datasets are saved as proper csv files with headers now. This should make anything relating to instances much more convenient for the user. The benchmarks in question are:
- CMA-ES
- SGD
- Luby
- ToySGD
- Function Approximation

### Unifying CMA-ES Versions
Instead of having two different versions of CMA-ES, we now have a single environment which covers both step size adaption and algorithm variant selection of CMA-ES (formerly ModCMA). By changing the configuration space, the user can select which hyperparameters to adapt. This change includes a switch to the newer "ioh" package, meaning an increased amount of target functions could be interfaced in principle. Anything outside of BBOB will need to be loaded separately from the "read_instance_set" function of the benchmark, however.

### Unifying Function Approximation Tasks
To reduce the number of separate classes to maintain for simple function approximation, the Sigmoid variations and the Geometric environment have been fused into the FunctionApproximation Benchmark. There are several options for functions to approximate, as in Sigmoid it is possible to use a discrete space and you can add importance weights for the dimensions. The "get_benchmark" method will still provide the original Sigmoid configurations. Apart from that, this new environment should provide all functionality of the previous environments, just with a simpler path to getting there.

### Re-implementing SGD Benchmark
The original SGD benchmark was complex and error prone, lacking important features like compatibility with torchhub. Therefore this has been re-implemented, mostly based on the existing competition version. The code is simpler now and compatible with a larger selection of models and optimizers.

### Deprecating FastDownward
The FastDownward version compatible with the benchmark cannot be used with any Ubuntu version after 16.x - which is fairly old by now. For reference, it is not possible to even build a container for this version of FastDownward on th GitHub servers. Since there is no option to update the planner version without updating the environment and this is tied to significant domain knowledge, FastDownward will now be deprecated. This means there is no testing, the benchmark will not be updated and it will not be listed as an official benchmark any longer. If someone is familiar enough with FastDownward to facilitate an update, please notify us, we'd love to continue this benchmark!

### Updating Instance Sets
Most instance sets have been updated due to the instance specification change. The Sigmoid ones have been preserved, the rest has been updated. Sampling options for all benchmarks are included in the "instance_set" directory, however.

### Logger Update
The logs have been a bit hard to read & work with. We flattened them by removing timestamps, hopefully making them easier to work with.

### Dependency Upgrades
The dependencies have been upgraded to their current highest possible version.

### Simplify Examples
Some examples had a lot of extra dependencies. We removed many of these for now - this means less explicit RL examples, but if you want to use an RL library, DACBench will plug in like any other env, so you should read their documentation anyway.

### Including Instance Files in PyPI
There was a persistent configuration mistake which prevented the instance sets to be included in the PyPI installation - this should now be fixed and all instances sets from the repository come with the PyPI package.

# 0.2.0

### Interface Update
Expand Down
Loading
Loading