Skip to content

Commit

Permalink
Version 1.3 (PiBO #813, Tools #824)
Browse files Browse the repository at this point in the history
- PiBO: Augment the acquisition function by multiplying by a pdf given by the user.
The prior then decays over time, allowing for the optimization to carry on as per default.
- The `RunHistory` can now act as a `Mapping` in that you can use the usual methods you
can use on dicts, i.e. `len(rh)`, `rh.items()`, `rh[key]`. Previously this was usually done by
accessing `rh.data` which is still possible.
- Updated the signature of the `ROAR` facade to match with it's parent class `SMAC4AC`.
Anyone relying on the output directory without specifying an explicit `run_id` to a `ROAR`
facade should now expect to see the output directory at `run_0` instead of `run_1`. See #827.
- Updated and integrated flake8, mypy, black, and isort.
- SMAC uses `automl_sphinx_theme` now and therefore the API is displayed nicer.

Co-authored-by: Carl Hvarfner <[email protected]>
Co-authored-by: Difan Deng <[email protected]>
Co-authored-by: Carolin Benjamins <[email protected]>
Co-authored-by: Tim Ruhkopf <[email protected]>
Co-authored-by: eddiebergman <[email protected]>
  • Loading branch information
6 people authored Apr 19, 2022
1 parent 863e429 commit 9d0d107
Show file tree
Hide file tree
Showing 288 changed files with 9,235 additions and 19,071 deletions.
Binary file added .DS_Store
Binary file not shown.
16 changes: 6 additions & 10 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
[flake8]
max-line-length = 120
ignore = W605,E402,W503
show-source = True
application-import-names = smac
exclude =
max-line-length = 120
extend-exclude =
venv
.venv
build
.git
__pycache__
doc
build
dist
examples/spear_qcp/*
extend-ignore =
E203 # No whitespace before ':' in [x : y]
E731 # No lambdas — too strict
19 changes: 19 additions & 0 deletions .github/workflows/citation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: citation

on:
push:
paths:
- CITATION.cff

jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v2

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
with:
args: "--validate"
32 changes: 10 additions & 22 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: dist-check
name: dist

on:
# Manual trigger option in github
Expand All @@ -7,17 +7,15 @@ on:
# Trigger on push to these branches
push:
branches:
- master
- main
- development

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



jobs:
dist:
runs-on: ubuntu-latest
Expand All @@ -29,7 +27,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.8

- name: Build dist
run: |
Expand All @@ -40,19 +38,9 @@ jobs:
pip install twine
last_dist=$(ls -t dist/smac-*.tar.gz | head -n 1)
twine_output=`twine check "$last_dist"`
if [[ "$twine_output" != "Checking $last_dist: PASSED" ]]; then echo $twine_output && exit 1;fi
- name: Install dist
run: |
last_dist=$(ls -t dist/smac-*.tar.gz | head -n 1)
pip install $last_dist
- name: PEP 561 Compliance
run: |
pip install mypy
cd .. # required to use the installed version of smac
# Note that doesn't do a mypy check, only that the package exports type
# information
if ! mypy -c "import smac"; then exit 1; fi
if [[ "$twine_output" != "Checking $last_dist: PASSED" ]]
then
echo $twine_output
else
pip install $last_dist
fi
27 changes: 14 additions & 13 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,55 @@ on:
# Trigger on push to these branches
push:
branches:
- master
- main
- development

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

env:
name: SMAC3

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2

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

- name: Install dependencies
run: |
pip install -e .[all]
pip install ".[dev]"
- name: Make docs
run: |
cd docs
make buildapi
make html
make clean
make docs
- name: Pull latest gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
if: (contains(github.ref, 'develop') || contains(github.ref, 'main')) && github.event_name == 'push'
run: |
cd ..
git clone https://github.com/automl/SMAC3.git --branch gh-pages --single-branch gh-pages
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, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
if: (contains(github.ref, 'develop') || contains(github.ref, 'main')) && github.event_name == 'push'
run: |
branch_name=${GITHUB_REF##*/}
cd ../gh-pages
rm -rf $branch_name
cp -r ../SMAC3/docs/html $branch_name
cp -r ../${{ env.name }}/docs/build/html $branch_name
- name: Push to gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
if: (contains(github.ref, 'develop') || contains(github.ref, 'main')) && github.event_name == 'push'
run: |
last_commit=$(git log --pretty=format:"%an: %s")
cd ../gh-pages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
# Trigger on push to these branches
push:
branches:
- master
- main
- development

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

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
name: pre-commit

on:
# Manual trigger option in github
# Manually triggerable in github
workflow_dispatch:

# Trigger on push to these branches
# When a push occurs on either of these branches
push:
branches:
- master
- main
- development

# Trigger on a open/push to a PR targeting one of these branches
# When a push occurs on a PR that targets these branches
pull_request:
branches:
- master
- main
- development

jobs:

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

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

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

- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: |
pre-commit run --all-files
Loading

0 comments on commit 9d0d107

Please sign in to comment.