Skip to content

Commit 0a1dff4

Browse files
renesassSarah KrebsCarolin Benjaminsdengdifanhelegraf
authored
Version 2.0.0b1 (#892)
- Completely reimplemented the intensifiers (including Successive Halving and Hyperband): All intensifiers support multi-fidelity, multi-objective and multi-threading by nature now. - Expected behaviour for ask-and-tell interface ensured (also for Successive Halving). - Continuing a run is now fully supported. - Added more examples. - Updated documentation based on new implementation. - Added benchmark to compare different versions. Co-authored-by: Sarah Krebs <[email protected]> Co-authored-by: Carolin Benjamins <[email protected]> Co-authored-by: dengdifan <[email protected]> Co-authored-by: helegraf <[email protected]> Co-authored-by: timruhkopf <[email protected]> Co-authored-by: Alexander Tornede <[email protected]> Co-authored-by: Eric Kalosa-Kenyon <[email protected]>
1 parent dd249cd commit 0a1dff4

File tree

171 files changed

+14936
-8964
lines changed

Some content is hidden

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

171 files changed

+14936
-8964
lines changed

.flake8

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ extend-exclude =
66
.venv
77
build
88
extend-ignore =
9-
E203 # No whitespace before ':' in [x : y]
10-
E731 # No lambdas — too strict
9+
# No whitespace before ':' in [x : y]
10+
E203
11+
# No lambdas — too strict
12+
E731

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ jobs:
2525
with:
2626
submodules: recursive
2727

28-
- name: Setup Python 3.9
28+
- name: Setup Python 3.10
2929
uses: actions/setup-python@v4
3030
with:
31-
python-version: 3.9
31+
python-version: "3.10"
3232

3333
- name: Install pre-commit
3434
run: |
3535
pip install pre-commit
3636
pre-commit install
37+
3738
- name: Run pre-commit
3839
run: |
3940
pre-commit run --all-files

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,8 @@ dmypy.json
143143
docker
144144

145145
# Others
146-
src
146+
src
147+
148+
# Pycharm
149+
.idea
150+
.vscode

.pre-commit-config.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Click the repo and update to latest tags.
33
# If things break on update, raise an issue
44

5-
65
repos:
76
- repo: https://github.com/pycqa/isort
87
rev: 5.10.1
@@ -35,13 +34,12 @@ repos:
3534
- id: mypy
3635
name: mypy smac
3736
files: smac
38-
exclude: "scripts|tests|smac/utils/dependencies.py|smac/__init__.py"
37+
exclude: "scripts|tests"
3938

40-
- repo: https://gitlab.com/pycqa/flake8
41-
rev: 4.0.1
39+
- repo: https://github.com/PyCQA/flake8
40+
rev: 5.0.4
4241
hooks:
4342
- id: flake8
4443
name: flake8 smac
4544
files: smac
4645
exclude: "scripts|tests"
47-

changelog.md renamed to CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 2.0.0b1
2+
3+
- Completely reimplemented the intensifiers (including Successive Halving and Hyperband): All intensifiers support
4+
multi-fidelity, multi-objective and multi-threading by nature now.
5+
- Expected behaviour for ask-and-tell interface ensured (also for Successive Halving).
6+
- Continuing a run is now fully supported.
7+
- Added more examples.
8+
- Updated documentation based on new implementation.
9+
- Added benchmark to compare different versions.
10+
11+
112
# 2.0.0a2
213

314
## Bugfixes

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ If you found a bug, please provide us the following information:
4040
## Work on New Features
4141

4242
To work on new features, create a fork of the original repository and implement the feature there. When you are happy with the final result you can create a pull request which we will review.
43-
A good tutorial on how to do this is in the Github Guide: [Fork a repo](https://help.github.com/articles/fork-a-repo/).
43+
A good tutorial on how to do this is in the GitHub Guide: [Fork a repo](https://help.github.com/articles/fork-a-repo/).
4444

4545
## <a name="pull-requests"></a> Pull Requests
4646

47-
The target branch for your pull request has to be the development branch. If you have not worked with pull requests, please take a look at [how to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) or read more about it in the official github documentation <https://help.github.com/articles/about-pull-requests/>
47+
The target branch for your pull request has to be the development branch. If you have not worked with pull requests, please take a look at [how to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) or read more about it in the official GitHub documentation <https://help.github.com/articles/about-pull-requests/>
4848

4949
If you know how to fix a bug or implement your own feature, follow this small guide:
5050

5151
- Check the issue tracker if someone has already reported the same idea or found the same bug.
5252
- Create a pull request, after you have implemented your changes in your fork. Using a separate branch for the fix is required.
5353
- Pull request must include tests.
54-
- We are using the Google Style Python Docstrings. Take a look at this [example](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).
54+
- We are using the Numpy Style Python Docstrings. Take a look at this [example](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html#example-numpy).
5555
- The code should follow the PEP8 coding convention.
5656

5757
We try to react as fast as possible to your pull request.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ clean-data:
133133
# Will echo the commands to actually publish to be run to publish to actual PyPi
134134
# This is done to prevent accidental publishing but provide the same conveniences
135135
publish: clean build
136-
read -p "Did you update the version number?"
136+
read -p "Did you update the version number? Did you add the old version to docs/conf.py?"
137137

138138
$(PIP) install twine
139139
$(PYTHON) -m twine upload --repository testpypi ${DIST}/*

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sequential Model Algorithm Configuration (SMAC)
1+
# SMAC3: A Versatile Bayesian Optimization Package for Hyperparameter Optimization
22

33

44
[![Tests](https://github.com/automl/SMAC3/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/automl/SMAC3/actions/workflows/pytest.yml)
@@ -15,25 +15,28 @@ aggressive racing mechanism to efficiently decide which of two configurations pe
1515
SMAC3 is written in Python3 and continuously tested with Python 3.8, 3.9, and 3.10. Its Random
1616
Forest is written in C++. In further texts, SMAC is representatively mentioned for SMAC3.
1717

18-
> [Documention](https://automl.github.io/SMAC3)
18+
> [Documentation](https://automl.github.io/SMAC3)
1919
2020
> [Roadmap](https://github.com/orgs/automl/projects/5/views/2)
2121
2222

2323
## Important: Changes in v2.0
2424

2525
With the next big major release of SMAC, we drastically boosted the user experience by improving the APIs and how the
26-
pipelining is done (see [changelog](CHANGELOG.md)). However, cleaning the code base, we removed the command-line
27-
interface (calling a target function from a script is still supported), runtime optimization, and pSMAC. Also,
28-
python 3.7 is not supported anymore. If you depend on those functionalities, we kindly ask you to keep using v1.4.
26+
pipelining is done (see [changelog](CHANGELOG.md)). All facades/intensifiers support multi-objective, multi-fidelity,
27+
and multi-threading natively now! That includes having an ask-and-tell interface and continuing a run
28+
wherever you left off. pSMAC is removed because when specifying the number of workers, SMAC automatically uses
29+
multi-threading for evaluating trials. When cleaning the code base, however, we removed the command-line
30+
interface (calling a target function from a script is still supported), and runtime optimization. Also,
31+
python 3.7 is not supported anymore. If you depend on those functionalities, please keep using v1.4.
2932

3033
We are excited to introduce the new major release and look forward to developing new features on the new code base.
3134
We hope you enjoy this new user experience as much as we do. 🚀
3235

3336

3437
## Installation
3538

36-
This instruction is for the installation on a Linux system, for Windows and Mac and further information see the [documention](https://automl.github.io/SMAC3/main/installation.html).
39+
This instruction is for the installation on a Linux system, for Windows and Mac and further information see the [documentation](https://automl.github.io/SMAC3/main/1_installation.html).
3740

3841
Create a new environment with python 3.10 and make sure swig is installed either on your system or
3942
inside the environment. We demonstrate the installation via anaconda in the following:
@@ -91,7 +94,7 @@ smac = HyperparameterOptimizationFacade(scenario, train)
9194
incumbent = smac.optimize()
9295
```
9396

94-
More examples can be found in the [documention](https://automl.github.io/SMAC3/main/examples/).
97+
More examples can be found in the [documentation](https://automl.github.io/SMAC3/main/examples/).
9598

9699

97100
## License
@@ -114,8 +117,8 @@ SMAC3 is developed by the [AutoML Groups of the Universities of Hannover and
114117
Freiburg](http://www.automl.org/).
115118

116119
If you have found a bug, please report to [issues](https://github.com/automl/SMAC3/issues). Moreover, we are
117-
appreciating any kind of help. Find our guidlines for contributing to this package
118-
[here](https://github.com/automl/SMAC3/blob/master/.github/CONTRIBUTING.md).
120+
appreciating any kind of help. Find our guidelines for contributing to this package
121+
[here](CONTRIBUTING.md).
119122

120123
If you use SMAC in one of your research projects, please cite our
121124
[JMLR paper](https://jmlr.org/papers/v23/21-0888.html):

benchmark/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!src

benchmark/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SMAC Benchmark (Beta)
2+
3+
Calculates multiple tasks for specified versions and compares performance.
4+
Each version is derived from pip and installed in an empty environment (``SMACBenchmark``).
5+
6+
7+
## Results
8+
9+
![trajectory_trials](report/trajectory_walltime.png "Trajectory (Walltime)")
10+
11+
12+
## Getting Started
13+
14+
- Make sure you have anaconda installed.
15+
- Execute ``bash ./run.sh`` inside the benchmark directory. You can specify the versions to run there.
16+
- Have your current version of SMAC installed in the environment ``SMAC``. After the old versions have been finished, the script benchmarks the current version.
17+
- Alternatively, just execute ``python src/benchmark.py`` with a SMAC environment of your choice.
18+
19+
20+
## Note
21+
22+
- Versions before 2.0 might not support the new sklearn (>1.2) anymore

0 commit comments

Comments
 (0)