Skip to content
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

Version 2.0.0a1 #875

Merged
merged 753 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
753 commits
Select commit Hold shift + click to select a range
b3da515
A lot of work on intensifier
renesass Aug 15, 2022
cde6f70
Fix type?
renesass Aug 15, 2022
fafe612
Finally finished test_intensify
renesass Aug 16, 2022
4508a08
Importing and isort
renesass Aug 16, 2022
c89f8ba
Small user improvements
renesass Aug 16, 2022
0668714
Moved some files
renesass Aug 16, 2022
e5152b1
Testing parallel scheduler successful
renesass Aug 16, 2022
435ec87
Progress on SH tests
renesass Aug 16, 2022
988cc45
Implemented ASK-TELL interface
renesass Aug 16, 2022
01a99db
Expanded SH tests
renesass Aug 16, 2022
8be9453
Slightly changed ask-tell structure
renesass Aug 16, 2022
2f3178f
Slow progress on SH testing
renesass Aug 17, 2022
728e9e0
Added meta methods
renesass Aug 17, 2022
d51ec3a
Shifted old examples
renesass Aug 17, 2022
dd70faf
Added categories in examples
renesass Aug 17, 2022
e555202
Docs renders again
renesass Aug 17, 2022
e22526b
move boing and turbo to smbo
dengdifan Aug 18, 2022
ba3be97
typos
Aug 18, 2022
a3618ec
Merge remote-tracking branch 'origin/development-2.0' into developmen…
Aug 18, 2022
a065bf1
boing facade
dengdifan Aug 18, 2022
6a31077
Added option to pass evaluated configs
renesass Aug 18, 2022
e83a53d
MO algo does not return none anymore
renesass Aug 18, 2022
8f00fa8
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Aug 18, 2022
f256267
Cleaned-up runhistory
renesass Aug 18, 2022
eb77fcd
Improved examples
renesass Aug 18, 2022
4a917c1
Fixed wrong argument calls and mypi
renesass Aug 18, 2022
5df89fc
Added ordering of examples
renesass Aug 18, 2022
4de54de
Removed imputer
renesass Aug 23, 2022
a9221e9
Bugfixes
renesass Aug 23, 2022
efd86c7
Fixed test
renesass Aug 23, 2022
693cf22
Renamed loop to main
renesass Aug 23, 2022
328e6ee
Update to new format
Aug 24, 2022
aad4d15
Update to new format
Aug 24, 2022
a008b5c
Fix typing `runner`
eddiebergman Aug 24, 2022
b6e2288
initial design harmonized.
Aug 24, 2022
9fe8635
Merge remote-tracking branch 'origin/development-2.0' into developmen…
Aug 24, 2022
5ad358e
Update to new format
Aug 24, 2022
0024e62
Cleanup docs of `runner.py`
eddiebergman Aug 24, 2022
3e645eb
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
eddiebergman Aug 24, 2022
7e45926
examples and maint for boing, turbo
dengdifan Aug 24, 2022
f16ae8d
Update typing `dask_runner.py`
eddiebergman Aug 24, 2022
7379e14
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
dengdifan Aug 24, 2022
0d906d5
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
dengdifan Aug 24, 2022
b881cd4
Changes so far
Aug 24, 2022
cdeb97d
get_meta for initial design is including the configurations.
Aug 24, 2022
f878fdd
Change call of update
Aug 24, 2022
b64e016
Update to new style
Aug 24, 2022
9638ee5
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
Aug 24, 2022
9521dd8
FIX format, imports, docstrings
KEggensperger Aug 24, 2022
068f801
Fix star bug
Aug 24, 2022
9ed9b77
move boing arguments to init
dengdifan Aug 24, 2022
b6fef16
Update to new style
Aug 24, 2022
c933629
Make all attributes updatable
Aug 24, 2022
fc3b6d8
Rename par
Aug 24, 2022
fac3b63
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
Aug 24, 2022
7a85a1a
maint boing facade
dengdifan Aug 24, 2022
c3ead1b
Rename par
Aug 24, 2022
edbbbca
Move test file
Aug 24, 2022
b4afb2a
fix boing init
dengdifan Aug 24, 2022
5310a60
add abscent dependencies
dengdifan Aug 24, 2022
6fcced1
FIX imports, docstrings
KEggensperger Aug 24, 2022
ba5dd1b
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
KEggensperger Aug 24, 2022
0aeb8be
fix typing
dengdifan Aug 24, 2022
b68fe02
Tidy up dask runner
eddiebergman Aug 24, 2022
0399c9a
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
Aug 24, 2022
23aaa06
Update tests (unfinished)
Aug 24, 2022
a351b03
FIX docstrings & imports
KEggensperger Aug 24, 2022
ac2f13d
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
KEggensperger Aug 24, 2022
8822d9e
FIX imports, docstrings
KEggensperger Aug 24, 2022
f9ecc53
FIX import
KEggensperger Aug 24, 2022
0cca32e
fix boing
dengdifan Aug 24, 2022
82cf58d
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
dengdifan Aug 24, 2022
a575eb8
ADD assertions
KEggensperger Aug 24, 2022
23385d5
Merge remote-tracking branch 'origin/development-2.0' into developmen…
Aug 24, 2022
312ee21
renamed facade.scenario to _scenario (private attribute)
Aug 24, 2022
ccdfea1
added some basic tests for continuation of facades.
Aug 24, 2022
fc99a9f
Merged parallel schedulers
renesass Aug 24, 2022
12e09da
Fix example
renesass Aug 25, 2022
24a9254
Rename Runner to AbstractRunner
eddiebergman Aug 25, 2022
10a402c
Fix folder None
eddiebergman Aug 25, 2022
009f6cf
More intensification
renesass Aug 25, 2022
8aeb9fb
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Aug 25, 2022
e13ae3e
transform boing tests to new tests directory
dengdifan Aug 25, 2022
402a34d
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
dengdifan Aug 25, 2022
9f08b70
add boing smbo test
dengdifan Aug 25, 2022
938bdaa
FIX cosine anealing not restarting correctly
KEggensperger Aug 25, 2022
5df4596
FIX probability comparison & minor stuff
KEggensperger Aug 25, 2022
ae01c1d
ADD tests for random design
KEggensperger Aug 25, 2022
b574ca8
ADD unittest for prob w/ cooldown
KEggensperger Aug 25, 2022
4d3a600
move tests
dengdifan Aug 25, 2022
9f0d3cd
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
dengdifan Aug 25, 2022
6a1a10e
Facades: mostly added documentation. Removed ProbabilityConfiguration…
Aug 25, 2022
c31be60
Update runners
eddiebergman Aug 25, 2022
20aed3f
Merge remote-tracking branch 'origin/development-2.0' into developmen…
Aug 25, 2022
4084281
Fix test
eddiebergman Aug 25, 2022
38fd615
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
eddiebergman Aug 25, 2022
76c49bc
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
KEggensperger Aug 25, 2022
45b3b89
clear codes in boing facade and encoder
dengdifan Aug 25, 2022
0c2eb8d
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
dengdifan Aug 25, 2022
efbaf23
FIX parego regenerating weights too often
KEggensperger Aug 25, 2022
a2caf0a
fix boing facade
dengdifan Aug 25, 2022
d5f288f
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
KEggensperger Aug 25, 2022
911d8b4
ADD importing random_facade
KEggensperger Aug 25, 2022
73dcb43
FIX typo
KEggensperger Aug 25, 2022
25acb12
Finally finished SH tests
renesass Aug 25, 2022
aec748a
Added on_ask callbacks
renesass Aug 25, 2022
ad828af
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Aug 25, 2022
8e232ea
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
KEggensperger Aug 25, 2022
0607960
Complete runners
eddiebergman Aug 25, 2022
c308de6
Merge branch 'development-2.0' of github.com:automl/SMAC3 into develo…
KEggensperger Aug 25, 2022
1171ab6
FIX using pytest.parameterize
KEggensperger Aug 25, 2022
80e4d3d
Add yaml to mypy ignore
eddiebergman Aug 25, 2022
5ecfc8d
Delete unused logging stuff
eddiebergman Aug 25, 2022
5e2af76
Remove unused import
eddiebergman Aug 25, 2022
d7ec2ff
Update runhistory
eddiebergman Aug 25, 2022
aa75147
Remove types/bounds
renesass Aug 25, 2022
76e5630
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Aug 25, 2022
4a3aec6
fix tests issues
dengdifan Aug 25, 2022
84c1df3
Yo ya boi AggregationStrategy is outta here
eddiebergman Aug 25, 2022
2e3307b
remove logger from subspaces
dengdifan Aug 25, 2022
32df593
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
dengdifan Aug 25, 2022
43fc5d8
Typing upgrades
eddiebergman Aug 25, 2022
46c1009
Added version to meta
renesass Aug 30, 2022
6ee2c69
Renamed run to trial
renesass Aug 30, 2022
c78c0e8
Renamed Base to Abstract
renesass Aug 30, 2022
c34e3f3
Private variables
renesass Aug 30, 2022
4dbff4c
Improved ask-and-tell interface
renesass Aug 30, 2022
74783b6
More test conversions
Sep 1, 2022
97bb158
Looking through the examples up untill 2_mf/2_sgd_datasets.py
Sep 1, 2022
a7ff66a
Merge remote-tracking branch 'origin/development-2.0' into developmen…
Sep 1, 2022
f18c1f1
More test conversions
Sep 1, 2022
ac63d39
Need to pull
renesass Sep 1, 2022
dfb2c25
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Sep 1, 2022
7ce7afd
More test conversions
Sep 1, 2022
dcd89cb
Convert to new format
Sep 1, 2022
adff6b7
More tests but failing 🥲
Sep 1, 2022
75dfc6a
Huge init simplification of SH+HB
renesass Sep 1, 2022
7367ff4
Changed init design behaviour
renesass Sep 1, 2022
b01634b
Added signature checking
renesass Sep 1, 2022
540cd64
Specified docs for signatures
renesass Sep 1, 2022
6a1e196
Fixed some tests
renesass Sep 1, 2022
b125091
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Sep 1, 2022
47a2edc
Fixed none configuration
renesass Sep 2, 2022
7b1d7b4
Clean-up
renesass Sep 2, 2022
d1b5344
Correctly set model (and HPs) when using 'update'
Sep 2, 2022
bc2a162
More test conversions
Sep 2, 2022
9e347df
Remove old tests
Sep 2, 2022
5b39402
Reformat
Sep 2, 2022
4d2c821
Fix test
Sep 2, 2022
1b5b4f9
Budget is optional now
renesass Sep 2, 2022
5588320
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Sep 2, 2022
92843a3
Added more tests (runhistory in particular)
renesass Sep 2, 2022
78aaaf4
Completed ALL intensification tests 🥳🍾
renesass Sep 5, 2022
304ce0e
Fixed tests
renesass Sep 5, 2022
dd542c2
Added callback tests
renesass Sep 5, 2022
fb71a65
Added more tests
renesass Sep 6, 2022
6267008
Finished runhistory encoder
renesass Sep 6, 2022
9159397
Docstrings, variable renaming, cleaning, ...
renesass Sep 6, 2022
6a4cbc2
Spend a lot of time to make intensification nicer
renesass Sep 7, 2022
894e9f2
Completely finished intensification
renesass Sep 7, 2022
0730837
Finished initial design completely
renesass Sep 7, 2022
bededc6
Renamed abstract initial design file
renesass Sep 7, 2022
57d1f4a
Completely finished multi-objective
renesass Sep 7, 2022
bb4a31c
Finished random design completely
renesass Sep 7, 2022
4003aee
Renamed some random designs
renesass Sep 7, 2022
d1891bf
Removed abstract method
renesass Sep 7, 2022
6ec9825
Finished runner completely
renesass Sep 7, 2022
f01b44c
mypy
renesass Sep 7, 2022
df883fb
Moved unused files
renesass Sep 7, 2022
3f5e31b
Tests + docstrings
renesass Sep 7, 2022
78556cb
Fix test
renesass Sep 7, 2022
1a1c3fa
Data structure tests
renesass Sep 8, 2022
2850b23
Remove unitteset
Sep 8, 2022
e75ffda
rewrite model classes(except for kernels and priors)
dengdifan Sep 8, 2022
9807dd7
[DOC] annotations in MF Facade and examples.
Sep 8, 2022
44ebade
First conversions
Sep 8, 2022
6396301
Added warning if no instance features are givene
renesass Sep 8, 2022
7652b53
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Sep 8, 2022
1bb1a56
Nearly finished model refactoring
renesass Sep 9, 2022
6f7153d
Working again
renesass Sep 13, 2022
5a7431c
Finished model files
renesass Sep 20, 2022
7a3af5c
Updated some model tests
renesass Sep 20, 2022
00e26ce
bloop
renesass Sep 20, 2022
b935d06
Finished model tests but some still fail
renesass Sep 21, 2022
39ddef1
Finished acquisition files
renesass Sep 21, 2022
b2f44e1
Fixed acqusition function tests
renesass Sep 21, 2022
aeb3773
Those tests are naasty
renesass Sep 21, 2022
d2ea56c
Removed print
renesass Sep 21, 2022
18bd0fc
Finished acquisition tests (one still fails tho)
renesass Sep 22, 2022
37b3cc1
Changed acq optimizer to acq maximizer again
renesass Sep 22, 2022
426a306
Added prior example
renesass Sep 22, 2022
d43f8f2
Clean-up 🧼
renesass Sep 22, 2022
cfeee0d
Removed old examples
renesass Sep 22, 2022
494db19
Comment boing/turbo
renesass Sep 22, 2022
75113f8
Renamed TA to TF
renesass Sep 22, 2022
d2cdf29
Improved docstrings
renesass Sep 22, 2022
2ff6fa0
Bugfixes
renesass Sep 22, 2022
e5d9220
Fixed more things
renesass Sep 22, 2022
14f6f40
Format isort
renesass Sep 22, 2022
bb008f2
Too much... dont ask
renesass Sep 23, 2022
7dbea61
Docstrings
renesass Sep 26, 2022
97cc249
Updated tests
renesass Sep 26, 2022
cfb0c28
Added validate method
renesass Sep 26, 2022
dc3a4a0
Updated examples
renesass Sep 26, 2022
1607d55
Removed spaming debug message
renesass Sep 26, 2022
e869311
Changed the order st scenario is saved before calling opti
renesass Sep 26, 2022
1d323a8
Smaller things
renesass Sep 26, 2022
18aecff
Added option to save old run
renesass Sep 26, 2022
65835a9
Added continue tests
renesass Sep 27, 2022
3b322ff
Changed get_meta to meta
renesass Sep 27, 2022
c2cd859
Updated continue tests
renesass Sep 27, 2022
6a88cfa
Tests
renesass Sep 27, 2022
5727541
Finished facade files
renesass Sep 27, 2022
88d269e
Finished main files
renesass Sep 27, 2022
3857122
Restructured docs a bit
renesass Sep 27, 2022
b01b158
Fixed pre-commit
renesass Sep 28, 2022
f352f04
Added objective weights
renesass Sep 28, 2022
be0873e
Documentation and small improvements
renesass Sep 28, 2022
6122612
Formating
renesass Sep 28, 2022
c2e75da
Added callback example
renesass Sep 28, 2022
19e03fc
Bugfix
renesass Sep 28, 2022
2031966
Updated docs+examples
renesass Sep 29, 2022
11b73de
Renamed some things
renesass Sep 29, 2022
dd39ec3
More docs
renesass Sep 29, 2022
2b65185
Integrated MO-algorithm directly in RH
renesass Sep 30, 2022
35962cf
Fixed tests/format
renesass Sep 30, 2022
a4c2774
Added target function script
renesass Oct 4, 2022
e1f86ce
Fixed tests/docs
renesass Oct 4, 2022
9cb0349
Fixed pre-commit
renesass Oct 4, 2022
4fbea77
Tried to integrate BOinG; unsuccessful
renesass Oct 5, 2022
c2633d3
Docs, test, small things
renesass Oct 6, 2022
62b1155
Docs
renesass Oct 7, 2022
48cb5d6
fix bounds for DE
dengdifan Oct 10, 2022
0a5eb08
correct gp's diagonal_std prediction
dengdifan Oct 10, 2022
0e86419
maint default argument of gp
dengdifan Oct 10, 2022
2e20296
Prepare release
renesass Oct 11, 2022
d0d2711
Enabled more tests
renesass Oct 11, 2022
b7f3bfa
Updated readme
renesass Oct 11, 2022
53dc526
Merged main
renesass Oct 11, 2022
0a1e7eb
Update README.md
benjamc Oct 11, 2022
dae994c
Update README.md
benjamc Oct 11, 2022
f1c8ed6
Updated text
renesass Oct 11, 2022
3fbb179
Updated versions
renesass Oct 11, 2022
cfbba16
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
renesass Oct 11, 2022
546fa11
Fix typo
Oct 11, 2022
dad62af
Merge branch 'development-2.0' of https://github.com/automl/SMAC3 int…
Oct 11, 2022
d129c7c
Fix typo
Oct 11, 2022
7f31f5c
Update README.md
benjamc Oct 11, 2022
823b5b9
Update facade name
Oct 11, 2022
1b75cec
Updated changelog
renesass Oct 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ on:
branches:
- main
- development
- development-2.0

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

jobs:
dist:
Expand All @@ -27,7 +29,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"

- name: Build dist
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ on:
branches:
- main
- development
- development-2.0

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

env:
name: SMAC3
Expand All @@ -31,7 +33,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/examples.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ on:
branches:
- main
- development
- development-2.0

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

jobs:
run-all-files:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ on:
branches:
- main
- development
- development-2.0

# Triggers with push to a pr aimed at main
pull_request:
branches:
- main
- development
- development-2.0

schedule:
# Every day at 7AM UTC
Expand Down Expand Up @@ -43,7 +45,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
python-version: ["3.8", "3.9", "3.10"]
# python-version: ["3.8"]
os: ["ubuntu-latest"]

steps:
Expand Down Expand Up @@ -96,7 +99,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10"]
# python-version: ["3.8"]
os: ["ubuntu-latest"]

steps:
Expand Down Expand Up @@ -132,7 +136,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10"]
# python-version: ["3.8"]
os: ["ubuntu-latest"]

steps:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,13 @@ dmypy.json
.pyre/

*smac3-output_*
*smac3_output*

# macOS files
.DS_Store

# Remove docker files
docker
docker

# Others
src
8 changes: 1 addition & 7 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# MANIFEST.in defines what files are included/excluded from a built pacakage
# that gets installed through PyPI or through `pip install`
# To modify, check out
# https://packaging.python.org/en/latest/guides/using-manifest-in/

# Include individual files
include LICENSE.txt
include requirements.txt
include smac/py.typed # This file is to export types
include smac/logging.yml

prune tests
prune examples
90 changes: 45 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,39 @@
[![codecov
Status](https://codecov.io/gh/automl/SMAC3/branch/master/graph/badge.svg)](https://codecov.io/gh/automl/SMAC3)

SMAC is a tool for algorithm configuration to optimize the parameters of
arbitrary algorithms, including hyperparameter optimization of Machine Learning algorithms. The main core consists of
Bayesian Optimization in combination with an aggressive racing mechanism to
efficiently decide which of two configurations performs better.
SMAC is a tool for algorithm configuration to optimize the parameters of arbitrary algorithms, including hyperparameter
optimization of Machine Learning algorithms. The main core consists of Bayesian Optimization in combination with an
aggressive racing mechanism to efficiently decide which of two configurations performs better.

SMAC3 is written in Python3 and continuously tested with Python 3.7, 3.8, 3.9, and 3.10. Its Random
SMAC3 is written in Python3 and continuously tested with Python 3.8, 3.9, and 3.10. Its Random
Forest is written in C++. In further texts, SMAC is representatively mentioned for SMAC3.

> [Documention](https://automl.github.io/SMAC3)

> [Roadmap](https://github.com/orgs/automl/projects/5/views/2)


## Important: Changes in v2.0

With the next big major release of SMAC, we drastically boosted the user experience by improving the APIs and how the
pipelining is done (see [changelog](CHANGELOG.md)). However, cleaning the code base, we removed the command-line
interface (calling a target function from a script is still supported), runtime optimization, and pSMAC. Also,
python 3.7 is not supported anymore. If you depend on those functionalities, we kindly ask you to keep using v1.4.

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


## Installation

Create a new environment with python 3.9 and make sure swig is installed either on your system or
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).

Create a new environment with python 3.10 and make sure swig is installed either on your system or
inside the environment. We demonstrate the installation via anaconda in the following:

Create and activate environment:
```
conda create -n SMAC python=3.9
conda create -n SMAC python=3.10
conda activate SMAC
```

Expand All @@ -44,56 +56,41 @@ pip install smac
Or alternatively, clone the environment:
```
git clone https://github.com/automl/SMAC3.git && cd SMAC3
pip install -r requirements.txt
pip install .
pip install -e .[dev]
```

We refer to the [documention](https://automl.github.io/SMAC3) for further installation options.


## Minimal Example

```py
import numpy as np

from sklearn.ensemble import RandomForestClassifier
from ConfigSpace import ConfigurationSpace
from ConfigSpace.hyperparameters import UniformIntegerHyperparameter
from smac.facade.smac_bb_facade import SMAC4BB
from smac.scenario.scenario import Scenario


X_train, y_train = np.random.randint(2, size=(20, 2)), np.random.randint(2, size=20)
X_val, y_val = np.random.randint(2, size=(5, 2)), np.random.randint(2, size=5)
from ConfigSpace import Configuration, ConfigurationSpace

import numpy as np
from smac import HyperparameterOptimizationFacade, Scenario
from sklearn import datasets
from sklearn.svm import SVC
from sklearn.model_selection import cross_val_score

def train_random_forest(config):
model = RandomForestClassifier(max_depth=config["depth"])
model.fit(X_train, y_train)
iris = datasets.load_iris()

# Define the evaluation metric as return
return 1 - model.score(X_val, y_val)

def train(config: Configuration, seed: int = 0) -> float:
classifier = SVC(C=config["C"], random_state=seed)
scores = cross_val_score(classifier, iris.data, iris.target, cv=5)
return 1 - np.mean(scores)

if __name__ == "__main__":
# Define your hyperparameters
configspace = ConfigurationSpace()
configspace.add_hyperparameter(UniformIntegerHyperparameter("depth", 2, 100))

# Provide meta data for the optimization
scenario = Scenario({
"run_obj": "quality", # Optimize quality (alternatively runtime)
"runcount-limit": 10, # Max number of function evaluations (the more the better)
"cs": configspace,
})
configspace = ConfigurationSpace({"C": (0.100, 1000.0)})

smac = SMAC4BB(scenario=scenario, tae_runner=train_random_forest)
best_found_config = smac.optimize()
# Scenario object specifying the optimization environment
scenario = Scenario(configspace, deterministic=True, n_trials=200)

# Use SMAC to find the best configuration/hyperparameters
smac = HyperparameterOptimizationFacade(scenario, train)
incumbent = smac.optimize()
```

More examples can be found in the [documention](https://automl.github.io/SMAC3).

More examples can be found in the [documention](https://automl.github.io/SMAC3/main/examples/).


## License
Expand All @@ -109,15 +106,18 @@ You should have received a copy of the 3-clause BSD license
along with this program (see LICENSE file).
If not, see [here](https://opensource.org/licenses/BSD-3-Clause).


## Miscellaneous

SMAC3 is developed by the [AutoML Groups of the Universities of Hannover and
Freiburg](http://www.automl.org/).

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

If you use SMAC in one of your research projects, please cite our [JMLR paper](https://jmlr.org/papers/v23/21-0888.html):
If you use SMAC in one of your research projects, please cite our
[JMLR paper](https://jmlr.org/papers/v23/21-0888.html):
```
@article{JMLR:v23:21-0888,
author = {Marius Lindauer and Katharina Eggensperger and Matthias Feurer and André Biedenkapp and Difan Deng and Carolin Benjamins and Tim Ruhkopf and René Sass and Frank Hutter},
Expand All @@ -131,4 +131,4 @@ If you use SMAC in one of your research projects, please cite our [JMLR paper](h
}
```

Copyright (C) 2016-2022 [AutoML Group](http://www.automl.org/).
Copyright (C) 2016-2022 [AutoML Group](http://www.automl.org).
Loading