Skip to content

Commit

Permalink
Version 2.0.2 (automl#1060)
Browse files Browse the repository at this point in the history
* maint

* fix wrongly imported func name in tests

* Add reference for pSMAC #609

* Rename example file

* Added roadmap to readme

* Prettification

* Add result merger

* Reformat with black

* Delete unnecessary import

* Fix typing

* Inject first trajectory entry from file from first rundir

* Add test for ResultMerger

* Fix docstring

* Get runhistory and trajectory from pSMAC run

Via the result merger. Searchers rundirs and
merges found runhistories and calculates a
new trajectory.

* Get trajectory

* Add regex to requirements

* Fixed MO cache problem

* Fix MO tests

* Fixing MO in AbstractRacer

* Accepting ints

* Hacking in the sum cost for MO

* Fix mypi

* Bugfix

* Make mypi happy

* Fix tests

* Make format

* Remove num_obj in MO optimizer

* A lot of restructuring

* Solve importings

* Solve importings

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Updated changelog

* Still fixing :)

* fix docstrings

* Change directory of tests

* Fix ambiguous variable

* Del newlines

* fix mypy

* mypy and doc fix

* Removed int type checking

* fix tests

* Always return List of incs

* fix path issue in example

* maint boing facade

* Better docstring

* Return values if no bounds passed

* Removed import

* Return only one incumbent

* Rename n_optimizers -> n_workers

* Update example

* Update docstring

* Remove legacy function

* Update to new signature

* Update changelog.md

* Format black

* Update test

* Please pre-commit

* Merge development

* Fix tests

* Fix typos

* Format black

* Updated text

* Increased version

* Improved readme

* SMAC logo 50%

* SMAC logo 50%

* Removed dev-2.0

* Added doc workflow for latest tag

* Fixing docs latest tag

* Fixing docs latest tag

* First steps new intensifier

* Make it work again

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* Test issues

* FIX formatting

* Link to old documentation

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* FIX formatting

* Fix unit tests

* Add annotation

* corrected log prob for tophat prior

* Removed configurations from callback

* Fixed tests

* Fix mypy

* Save docs as latest version too

* Enabled all tests again

* Make version an env

* Added last version to docs

* Global variable fix

* Added v before version number

* New Intensifier Implementation (#888)

- 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.

* First benchmark steps

* Added a warning

* Set xi to 0.01

* Incorporated walltime in trajectory

* Working version of benchmark

* Changed requirements

* Changed xi back to 0.0 again

* No duplicate budgets

* Fixed bug which updated tracker wrongly

* Bugfix: Delete correct bracket+stage

* Fixed tests

* Added costs to the trajectory

* Changed initial design max ratio to 0.25

* Make format

* Added more details to intensifier

* Finished benchmark

* Added benchmark source files

* Fixed tests because of initial design changes

* Improved runhistory API

* Fixed typo (#894)

* Merge doc fixes

* Doc fixes (#893)

Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>

* Make format

* Satisfied mypy

* Enabled more tests

* Increased version

* Mypy

* Mypy

* Mypy

* Fixed critical bug when using highest budget for inc selection

* Added SH+HB comparison

* Stuff

* Updated report

* Fixed docstring

* Fixed image path

* Removed vscode folder

* Bugfixes

* Doc fixes

* Updated changelog

* Make isort

* Fix typos

* Removed new line

* Added alpha2 to docs selection

* update description

* Fix 531 correctly create integers in initial design

This PR fixes a bug in which integer hyperparameters would not
be created correctly in the initial design. This went
unnoticed, except in the case where it was part of a condition
and the function deactivate_inactive_hyperparameters was
called.

This PR fixes this bug by mapping the random float that was
sampled by, for example and LHD or Sobol sequence, to the
float representation of an integer by calling _transform and
_inverse_transform of the integer hyperparameter.

* Add contact paragraph to README.

* Increase days until stale issues are closed by stalebot (#904)

* Edit changelog

* Add issue number

* Closes #907

* Clarify origin of configurations (#908)

* Random forest speed up (#903)

Co-authored-by: René Sass <mail@renesass.de>

* Add: workflow to update pre-commit versions (#874)

Co-authored-by: René Sass <mail@renesass.de>

* Add Git-Flow Workflow Specification

* [DOC] acquisition function maximizers

* Add stale reminder email action

* Increase version number of ConfigSpace

* Add guideline for updating copyright notice years to CONTRIBUTING.md

* Update requirement for pyrfr (#920)

* Update pre-commit: isort,flake8 version numbers

* Format black

* Fix mypy

* Ac bench (#929)

* Add Branin AC Task

* Add ac optimization type

* Nicer plotting

* Add ac mode

* Update ac task

* Make new smac env name adjustable

* Increase python version for smac 1.4

* Update benchmark

* Update plotting

* Goodby comments

* Fix path

* Fix 1.4 wrapper

* Update benchmark results

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* [DOC] added documentation on the incumbent update

* Feature/add version to make publish (#931)

* Add version, correct package name and use bash in makefile

* Increase version

* Increase version in makefile, add places with versions to make publish

* Fix typo

* Transform integer feature names to strings (#930)

* Transform int features to str

* Fix pre-commit

* Update version to 2.0.0

* Update version to 2.0.0

* Update CHANGELOG.md

* Add information on deepcave to the readme

* Correct doc version

* fix(runhistory): set id of the sampled config (#951)

* fix: Set config_id of config in runhistory

* ci: Set dependabot to target development branch (#963)

* feat: Option preventing SMAC setting up logging (#947)

* Version 2.0.0 (#898)

* Update runhistory2epm.py

* pre_commit

* Updated changelog

* Fixed comment

* Updated changelog

* Some small improvements

* Removed trailing space

* Updated changelog

* Restricted pynisher

* Updated changelog

* Link JMLR paper

* Update bibtex entry

Before: arxiv paper, now journal article.

* Fixed citation in docs

* Fixed callback typos

* BOinG for mixed hyperparameter search space

* fix format

* maint

* maint documentation

* maint pre-commit

* fix workflow

* maint

* Add dependabot for workflow files

* Bump actions/setup-python from 2 to 4 (#849)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/checkout from 2 to 3 (#850)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* maint

* Updated stale bot

* Updated stale options again

* Fixed typing

* Increased version

* rename check_point_in_ss to check_subspace_point

* Make format

* Uncomment test procedure

* docstrings for boing facade

* avoid typing namespace everywhere in epm_configuration_chooser

* fix docstring in rh2epm_boing

* Limit on dask

* Trying to fix tests

* Replaced typing in all files

* docstring for boing subspace

* Changed feature requests to feature

* allow acq_optimizer_local_kwargs to be passed to boing subspace without acq_optimizer_local

* fix pre-commit

* Added any

* Update facade

* Fix typing
* Match arguments from pSMAC with SMAC4AC signature
* Add description of pSMAC to docstring
* Add option to pass facade class to pSMAC

* Add example for pSMAC

* Removed docstring in readme's example

* Corrected text

* move construct_gp_kernels to smac.epm_gpytorch.boing_kernels

* maint

* fix wrongly imported func name in tests

* Add reference for pSMAC #609

* Rename example file

* Added roadmap to readme

* Prettification

* Add result merger

* Reformat with black

* Delete unnecessary import

* Fix typing

* Inject first trajectory entry from file from first rundir

* Add test for ResultMerger

* Fix docstring

* Get runhistory and trajectory from pSMAC run

Via the result merger. Searchers rundirs and
merges found runhistories and calculates a
new trajectory.

* Get trajectory

* Add regex to requirements

* Fixed MO cache problem

* Fix MO tests

* Fixing MO in AbstractRacer

* Accepting ints

* Hacking in the sum cost for MO

* Fix mypi

* Bugfix

* Make mypi happy

* Fix tests

* Make format

* Remove num_obj in MO optimizer

* A lot of restructuring

* Solve importings

* Solve importings

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Updated changelog

* Still fixing :)

* fix docstrings

* Change directory of tests

* Fix ambiguous variable

* Del newlines

* fix mypy

* mypy and doc fix

* Removed int type checking

* fix tests

* Always return List of incs

* fix path issue in example

* maint boing facade

* Better docstring

* Return values if no bounds passed

* Removed import

* Return only one incumbent

* Rename n_optimizers -> n_workers

* Update example

* Update docstring

* Remove legacy function

* Update to new signature

* Update changelog.md

* Format black

* Update test

* Please pre-commit

* Merge development

* Fix tests

* Fix typos

* Format black

* Updated text

* Increased version

* Improved readme

* SMAC logo 50%

* SMAC logo 50%

* Removed dev-2.0

* Added doc workflow for latest tag

* Fixing docs latest tag

* Fixing docs latest tag

* First steps new intensifier

* Make it work again

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* Test issues

* FIX formatting

* Link to old documentation

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* FIX formatting

* Fix unit tests

* Add annotation

* corrected log prob for tophat prior

* Removed configurations from callback

* Fixed tests

* Fix mypy

* Save docs as latest version too

* Enabled all tests again

* Make version an env

* Added last version to docs

* Global variable fix

* Added v before version number

* New Intensifier Implementation (#888)

- 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.

* First benchmark steps

* Added a warning

* Set xi to 0.01

* Incorporated walltime in trajectory

* Working version of benchmark

* Changed requirements

* Changed xi back to 0.0 again

* No duplicate budgets

* Fixed bug which updated tracker wrongly

* Bugfix: Delete correct bracket+stage

* Fixed tests

* Added costs to the trajectory

* Changed initial design max ratio to 0.25

* Make format

* Added more details to intensifier

* Finished benchmark

* Added benchmark source files

* Fixed tests because of initial design changes

* Improved runhistory API

* Fixed typo (#894)

* Merge doc fixes

* Doc fixes (#893)

Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>

* Make format

* Satisfied mypy

* Enabled more tests

* Increased version

* Mypy

* Mypy

* Mypy

* Fixed critical bug when using highest budget for inc selection

* Added SH+HB comparison

* Stuff

* Updated report

* Fixed docstring

* Fixed image path

* Removed vscode folder

* Bugfixes

* Doc fixes

* Updated changelog

* Make isort

* Fix typos

* Removed new line

* Added alpha2 to docs selection

* update description

* Fix 531 correctly create integers in initial design

This PR fixes a bug in which integer hyperparameters would not
be created correctly in the initial design. This went
unnoticed, except in the case where it was part of a condition
and the function deactivate_inactive_hyperparameters was
called.

This PR fixes this bug by mapping the random float that was
sampled by, for example and LHD or Sobol sequence, to the
float representation of an integer by calling _transform and
_inverse_transform of the integer hyperparameter.

* Add contact paragraph to README.

* Increase days until stale issues are closed by stalebot (#904)

* Edit changelog

* Add issue number

* Closes #907

* Clarify origin of configurations (#908)

* Random forest speed up (#903)

Co-authored-by: René Sass <mail@renesass.de>

* Add: workflow to update pre-commit versions (#874)

Co-authored-by: René Sass <mail@renesass.de>

* Add Git-Flow Workflow Specification

* [DOC] acquisition function maximizers

* Add stale reminder email action

* Increase version number of ConfigSpace

* Add guideline for updating copyright notice years to CONTRIBUTING.md

* Update requirement for pyrfr (#920)

* Update pre-commit: isort,flake8 version numbers

* Format black

* Fix mypy

* Ac bench (#929)

* Add Branin AC Task

* Add ac optimization type

* Nicer plotting

* Add ac mode

* Update ac task

* Make new smac env name adjustable

* Increase python version for smac 1.4

* Update benchmark

* Update plotting

* Goodby comments

* Fix path

* Fix 1.4 wrapper

* Update benchmark results

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* [DOC] added documentation on the incumbent update

* Feature/add version to make publish (#931)

* Add version, correct package name and use bash in makefile

* Increase version

* Increase version in makefile, add places with versions to make publish

* Fix typo

* Transform integer feature names to strings (#930)

* Transform int features to str

* Fix pre-commit

* Update version to 2.0.0

* Update version to 2.0.0

* Update CHANGELOG.md

* Add information on deepcave to the readme

* Correct doc version

---------

Co-authored-by: dengdifan <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Matthias Feurer <feurerm@informatik.uni-freiburg.de>
Co-authored-by: Carolin Benjamins <benjamin@tnt.uni-hannover.de>
Co-authored-by: eddiebergman <eddiebergmanhs@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Katharina Eggensperger <eggenspk@informatik.uni-freiburg.de>
Co-authored-by: Eric Kalosa-Kenyon <ekquasar@appdynamics.com>
Co-authored-by: Pascal <66594767+PascalIversen@users.noreply.github.com>
Co-authored-by: helegraf <Graf.Helena@web.de>
Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <a.tornede@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <44395781+alexandertornede@users.noreply.github.com>
Co-authored-by: Sarah Krebs <30651149+sarah-krebs@users.noreply.github.com>
Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: Jeroen Rook <jrook94@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@googlemail.com>

* feat: Option preventing SMAC setting up logging

* fix: Run isort

* Bump peter-evans/create-pull-request from 3 to 5 (#958)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/setup-python from 2 to 4 (#945)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: Option preventing SMAC setting up logging

* fix: Run isort

* fix: Add to changelog

* feat: Option preventing SMAC setting up logging

* fix: Run isort

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: René Sass <mail@renesass.de>
Co-authored-by: dengdifan <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Matthias Feurer <feurerm@informatik.uni-freiburg.de>
Co-authored-by: Carolin Benjamins <benjamin@tnt.uni-hannover.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Katharina Eggensperger <eggenspk@informatik.uni-freiburg.de>
Co-authored-by: Eric Kalosa-Kenyon <ekquasar@appdynamics.com>
Co-authored-by: Pascal <66594767+PascalIversen@users.noreply.github.com>
Co-authored-by: helegraf <Graf.Helena@web.de>
Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <a.tornede@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <44395781+alexandertornede@users.noreply.github.com>
Co-authored-by: Sarah Krebs <30651149+sarah-krebs@users.noreply.github.com>
Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: Jeroen Rook <jrook94@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@googlemail.com>

* Citation update (#961)

* update CITATION.cff

* update order in CITATION.cff

* fix citation date

* fix citation

* maint

* Adjust hyperband configuration distribution across brackets

* Compute the actual differences between the isb keys. (#957)

* Compute the actual differences between the isb keys.

* Added change to CHANGELOG.md

* Adjust schedule for stale reminder

* fix(logging): Prevent automatic logging setup at init (#970)

* fix(logging): Prevent automatic logging setup at init

* fix(logging): Rely on `setup_logging` to handle arg

* Fix validate method of smbo, update docstring.

* Allow callbacks to be added to a specific index, make callback registering public

* Update CHANGELOG.md

* Fix broken references (#988)

* Adapt developer install instructions to include pre-commit installation (#994)

* [Feature] Initial Design now supports executing the default config provided by the user by means of the configspace he generated. (and is no longer ignored)

* Pipe dask_client through facade for exec on hpc (#983)

* Pipe dask_client through facade for exec on hpc

* Handle pynisher's memory arg

Before: Could only pass int via SMAC with the default unit B, but now tuple/list is possible

* Update CHANGELOG.md

* Make format

* No printi

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* [Bug-fix] Pr was failing due to mutable additional configs default

* [doc-fix] the count of initial design configs is computed slightly differently

* Feature/metadata callback (#999)

* Add example for using a callback to log run metadata to a file

* Add issue number in changelog

* Changelog formatting

* Simplify metadata example

* Simplify metadata example

* Put callback in smac directory to allow importing it in custom repos

* Move callback files to callback directory

* Edit changelog

* Correct metadata callback argument types

* Additional metadata arguments in example

* Set metadata default values in callback

* Edit comment to fix PR

* Documentation/dask client example (#1001)

* Update requirements (dask_jobqueue)

* Fix broken link

* Ignore parallel example

* Add parallelization example

* Remove imports, add comment abt dask client

* Add E's information

* Update docs

* Add comment about n_workers

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Documentation/dask client example (#1001)

* Update requirements (dask_jobqueue)

* Fix broken link

* Ignore parallel example

* Add parallelization example

* Remove imports, add comment abt dask client

* Add E's information

* Update docs

* Add comment about n_workers

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Feature/dask client (#1002)

* Add info message that scenario.n_workers is ignored

When passing a dask client,
directly set n_workers in client.

* Change info to warning

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Update smac version (#1003)

* Update smac version

* Add hint on github release in make publish

* Update copyright year

* check if config in rh when storing state (#997)

* check if config in rh when storing state

* maint

* remove unnecessary changes

* Adapt developer install instructions to include pre-commit installation (#994)

* Pipe dask_client through facade for exec on hpc (#983)

* Pipe dask_client through facade for exec on hpc

* Handle pynisher's memory arg

Before: Could only pass int via SMAC with the default unit B, but now tuple/list is possible

* Update CHANGELOG.md

* Make format

* No printi

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* update changelog

* Increase tolerance for runhistory restoration test

---------

Co-authored-by: Sarah Segel <30651149+sarah-segel@users.noreply.github.com>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: Helena Graf <h.graf@ai.uni-hannover.de>

* Add a workaround to be able to pass a dataset via dask.scatter (#993)

* [feat] Support dask.scatter

* [fix] Add shared_data arg in abstract_facade

* Address the comments by Eddie

* [fix] Fix errors raised by Eddie

* [format] Apply black locally

* [fix] Get retries back to 16 as it was a mistake

* [doc] Update CHANGELOG

---------

Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>

* Adding Binder links for example (#976)

* binder

* maint

* fix dependencies

* maint docs

* Revert "maint docs"

This reverts commit 4fa1a0fae8dfa0b646e43273d50f72ddd76bf191.

* add requirement

---------

Co-authored-by: Difan Deng <deng@dengster.tnt.uni-hannover.de>

* Remove commit message from dependabot PRs (#1009)

* Bugfix/fix broken link (#1012)

* Remove commit message from dependabot PRs (#1010)

* rename check_point_in_ss to check_subspace_point

* Make format

* Uncomment test procedure

* docstrings for boing facade

* avoid typing namespace everywhere in epm_configuration_chooser

* fix docstring in rh2epm_boing

* Limit on dask

* Trying to fix tests

* Replaced typing in all files

* docstring for boing subspace

* Changed feature requests to feature

* allow acq_optimizer_local_kwargs to be passed to boing subspace without acq_optimizer_local

* fix pre-commit

* Added any

* Update facade

* Fix typing
* Match arguments from pSMAC with SMAC4AC signature
* Add description of pSMAC to docstring
* Add option to pass facade class to pSMAC

* Add example for pSMAC

* Removed docstring in readme's example

* Corrected text

* move construct_gp_kernels to smac.epm_gpytorch.boing_kernels

* maint

* fix wrongly imported func name in tests

* Add reference for pSMAC #609

* Rename example file

* Added roadmap to readme

* Prettification

* Add result merger

* Reformat with black

* Delete unnecessary import

* Fix typing

* Inject first trajectory entry from file from first rundir

* Add test for ResultMerger

* Fix docstring

* Get runhistory and trajectory from pSMAC run

Via the result merger. Searchers rundirs and
merges found runhistories and calculates a
new trajectory.

* Get trajectory

* Add regex to requirements

* Fixed MO cache problem

* Fix MO tests

* Fixing MO in AbstractRacer

* Accepting ints

* Hacking in the sum cost for MO

* Fix mypi

* Bugfix

* Make mypi happy

* Fix tests

* Make format

* Remove num_obj in MO optimizer

* A lot of restructuring

* Solve importings

* Solve importings

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Updated changelog

* Still fixing :)

* fix docstrings

* Change directory of tests

* Fix ambiguous variable

* Del newlines

* fix mypy

* mypy and doc fix

* Removed int type checking

* fix tests

* Always return List of incs

* fix path issue in example

* maint boing facade

* Better docstring

* Return values if no bounds passed

* Removed import

* Return only one incumbent

* Rename n_optimizers -> n_workers

* Update example

* Update docstring

* Remove legacy function

* Update to new signature

* Update changelog.md

* Format black

* Update test

* Please pre-commit

* Merge development

* Fix tests

* Fix typos

* Format black

* Updated text

* Increased version

* Improved readme

* SMAC logo 50%

* SMAC logo 50%

* Removed dev-2.0

* Added doc workflow for latest tag

* Fixing docs latest tag

* Fixing docs latest tag

* First steps new intensifier

* Make it work again

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* Test issues

* FIX formatting

* Link to old documentation

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* FIX formatting

* Fix unit tests

* Add annotation

* corrected log prob for tophat prior

* Removed configurations from callback

* Fixed tests

* Fix mypy

* Save docs as latest version too

* Enabled all tests again

* Make version an env

* Added last version to docs

* Global variable fix

* Added v before version number

* New Intensifier Implementation (#888)

- 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.

* First benchmark steps

* Added a warning

* Set xi to 0.01

* Incorporated walltime in trajectory

* Working version of benchmark

* Changed requirements

* Changed xi back to 0.0 again

* No duplicate budgets

* Fixed bug which updated tracker wrongly

* Bugfix: Delete correct bracket+stage

* Fixed tests

* Added costs to the trajectory

* Changed initial design max ratio to 0.25

* Make format

* Added more details to intensifier

* Finished benchmark

* Added benchmark source files

* Fixed tests because of initial design changes

* Improved runhistory API

* Fixed typo (#894)

* Merge doc fixes

* Doc fixes (#893)

Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>

* Make format

* Satisfied mypy

* Enabled more tests

* Increased version

* Mypy

* Mypy

* Mypy

* Fixed critical bug when using highest budget for inc selection

* Added SH+HB comparison

* Stuff

* Updated report

* Fixed docstring

* Fixed image path

* Removed vscode folder

* Bugfixes

* Doc fixes

* Updated changelog

* Make isort

* Fix typos

* Removed new line

* Added alpha2 to docs selection

* update description

* Fix 531 correctly create integers in initial design

This PR fixes a bug in which integer hyperparameters would not
be created correctly in the initial design. This went
unnoticed, except in the case where it was part of a condition
and the function deactivate_inactive_hyperparameters was
called.

This PR fixes this bug by mapping the random float that was
sampled by, for example and LHD or Sobol sequence, to the
float representation of an integer by calling _transform and
_inverse_transform of the integer hyperparameter.

* Add contact paragraph to README.

* Increase days until stale issues are closed by stalebot (#904)

* Edit changelog

* Add issue number

* Closes #907

* Clarify origin of configurations (#908)

* Random forest speed up (#903)

Co-authored-by: René Sass <mail@renesass.de>

* Add: workflow to update pre-commit versions (#874)

Co-authored-by: René Sass <mail@renesass.de>

* Add Git-Flow Workflow Specification

* [DOC] acquisition function maximizers

* Add stale reminder email action

* Increase version number of ConfigSpace

* Add guideline for updating copyright notice years to CONTRIBUTING.md

* Update requirement for pyrfr (#920)

* Update pre-commit: isort,flake8 version numbers

* Format black

* Fix mypy

* Ac bench (#929)

* Add Branin AC Task

* Add ac optimization type

* Nicer plotting

* Add ac mode

* Update ac task

* Make new smac env name adjustable

* Increase python version for smac 1.4

* Update benchmark

* Update plotting

* Goodby comments

* Fix path

* Fix 1.4 wrapper

* Update benchmark results

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* [DOC] added documentation on the incumbent update

* Feature/add version to make publish (#931)

* Add version, correct package name and use bash in makefile

* Increase version

* Increase version in makefile, add places with versions to make publish

* Fix typo

* Transform integer feature names to strings (#930)

* Transform int features to str

* Fix pre-commit

* Update version to 2.0.0

* Update version to 2.0.0

* Update CHANGELOG.md

* Add information on deepcave to the readme

* Correct doc version

* fix(runhistory): set id of the sampled config (#951)

* fix: Set config_id of config in runhistory

* ci: Set dependabot to target development branch (#963)

* feat: Option preventing SMAC setting up logging (#947)

* Version 2.0.0 (#898)

* Update runhistory2epm.py

* pre_commit

* Updated changelog

* Fixed comment

* Updated changelog

* Some small improvements

* Removed trailing space

* Updated changelog

* Restricted pynisher

* Updated changelog

* Link JMLR paper

* Update bibtex entry

Before: arxiv paper, now journal article.

* Fixed citation in docs

* Fixed callback typos

* BOinG for mixed hyperparameter search space

* fix format

* maint

* maint documentation

* maint pre-commit

* fix workflow

* maint

* Add dependabot for workflow files

* Bump actions/setup-python from 2 to 4 (#849)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/checkout from 2 to 3 (#850)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* maint

* Updated stale bot

* Updated stale options again

* Fixed typing

* Increased version

* rename check_point_in_ss to check_subspace_point

* Make format

* Uncomment test procedure

* docstrings for boing facade

* avoid typing namespace everywhere in epm_configuration_chooser

* fix docstring in rh2epm_boing

* Limit on dask

* Trying to fix tests

* Replaced typing in all files

* docstring for boing subspace

* Changed feature requests to feature

* allow acq_optimizer_local_kwargs to be passed to boing subspace without acq_optimizer_local

* fix pre-commit

* Added any

* Update facade

* Fix typing
* Match arguments from pSMAC with SMAC4AC signature
* Add description of pSMAC to docstring
* Add option to pass facade class to pSMAC

* Add example for pSMAC

* Removed docstring in readme's example

* Corrected text

* move construct_gp_kernels to smac.epm_gpytorch.boing_kernels

* maint

* fix wrongly imported func name in tests

* Add reference for pSMAC #609

* Rename example file

* Added roadmap to readme

* Prettification

* Add result merger

* Reformat with black

* Delete unnecessary import

* Fix typing

* Inject first trajectory entry from file from first rundir

* Add test for ResultMerger

* Fix docstring

* Get runhistory and trajectory from pSMAC run

Via the result merger. Searchers rundirs and
merges found runhistories and calculates a
new trajectory.

* Get trajectory

* Add regex to requirements

* Fixed MO cache problem

* Fix MO tests

* Fixing MO in AbstractRacer

* Accepting ints

* Hacking in the sum cost for MO

* Fix mypi

* Bugfix

* Make mypi happy

* Fix tests

* Make format

* Remove num_obj in MO optimizer

* A lot of restructuring

* Solve importings

* Solve importings

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Fixing, fixing, fixing, ...

* Updated changelog

* Still fixing :)

* fix docstrings

* Change directory of tests

* Fix ambiguous variable

* Del newlines

* fix mypy

* mypy and doc fix

* Removed int type checking

* fix tests

* Always return List of incs

* fix path issue in example

* maint boing facade

* Better docstring

* Return values if no bounds passed

* Removed import

* Return only one incumbent

* Rename n_optimizers -> n_workers

* Update example

* Update docstring

* Remove legacy function

* Update to new signature

* Update changelog.md

* Format black

* Update test

* Please pre-commit

* Merge development

* Fix tests

* Fix typos

* Format black

* Updated text

* Increased version

* Improved readme

* SMAC logo 50%

* SMAC logo 50%

* Removed dev-2.0

* Added doc workflow for latest tag

* Fixing docs latest tag

* Fixing docs latest tag

* First steps new intensifier

* Make it work again

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* Test issues

* FIX formatting

* Link to old documentation

* MOVE random weight initialization to smbo ask method

* ADD enable parego in unittests

* FIX formatting

* Fix unit tests

* Add annotation

* corrected log prob for tophat prior

* Removed configurations from callback

* Fixed tests

* Fix mypy

* Save docs as latest version too

* Enabled all tests again

* Make version an env

* Added last version to docs

* Global variable fix

* Added v before version number

* New Intensifier Implementation (#888)

- 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.

* First benchmark steps

* Added a warning

* Set xi to 0.01

* Incorporated walltime in trajectory

* Working version of benchmark

* Changed requirements

* Changed xi back to 0.0 again

* No duplicate budgets

* Fixed bug which updated tracker wrongly

* Bugfix: Delete correct bracket+stage

* Fixed tests

* Added costs to the trajectory

* Changed initial design max ratio to 0.25

* Make format

* Added more details to intensifier

* Finished benchmark

* Added benchmark source files

* Fixed tests because of initial design changes

* Improved runhistory API

* Fixed typo (#894)

* Merge doc fixes

* Doc fixes (#893)

Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>

* Make format

* Satisfied mypy

* Enabled more tests

* Increased version

* Mypy

* Mypy

* Mypy

* Fixed critical bug when using highest budget for inc selection

* Added SH+HB comparison

* Stuff

* Updated report

* Fixed docstring

* Fixed image path

* Removed vscode folder

* Bugfixes

* Doc fixes

* Updated changelog

* Make isort

* Fix typos

* Removed new line

* Added alpha2 to docs selection

* update description

* Fix 531 correctly create integers in initial design

This PR fixes a bug in which integer hyperparameters would not
be created correctly in the initial design. This went
unnoticed, except in the case where it was part of a condition
and the function deactivate_inactive_hyperparameters was
called.

This PR fixes this bug by mapping the random float that was
sampled by, for example and LHD or Sobol sequence, to the
float representation of an integer by calling _transform and
_inverse_transform of the integer hyperparameter.

* Add contact paragraph to README.

* Increase days until stale issues are closed by stalebot (#904)

* Edit changelog

* Add issue number

* Closes #907

* Clarify origin of configurations (#908)

* Random forest speed up (#903)

Co-authored-by: René Sass <mail@renesass.de>

* Add: workflow to update pre-commit versions (#874)

Co-authored-by: René Sass <mail@renesass.de>

* Add Git-Flow Workflow Specification

* [DOC] acquisition function maximizers

* Add stale reminder email action

* Increase version number of ConfigSpace

* Add guideline for updating copyright notice years to CONTRIBUTING.md

* Update requirement for pyrfr (#920)

* Update pre-commit: isort,flake8 version numbers

* Format black

* Fix mypy

* Ac bench (#929)

* Add Branin AC Task

* Add ac optimization type

* Nicer plotting

* Add ac mode

* Update ac task

* Make new smac env name adjustable

* Increase python version for smac 1.4

* Update benchmark

* Update plotting

* Goodby comments

* Fix path

* Fix 1.4 wrapper

* Update benchmark results

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* [DOC] added documentation on the incumbent update

* Feature/add version to make publish (#931)

* Add version, correct package name and use bash in makefile

* Increase version

* Increase version in makefile, add places with versions to make publish

* Fix typo

* Transform integer feature names to strings (#930)

* Transform int features to str

* Fix pre-commit

* Update version to 2.0.0

* Update version to 2.0.0

* Update CHANGELOG.md

* Add information on deepcave to the readme

* Correct doc version

---------

Co-authored-by: dengdifan <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Matthias Feurer <feurerm@informatik.uni-freiburg.de>
Co-authored-by: Carolin Benjamins <benjamin@tnt.uni-hannover.de>
Co-authored-by: eddiebergman <eddiebergmanhs@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Katharina Eggensperger <eggenspk@informatik.uni-freiburg.de>
Co-authored-by: Eric Kalosa-Kenyon <ekquasar@appdynamics.com>
Co-authored-by: Pascal <66594767+PascalIversen@users.noreply.github.com>
Co-authored-by: helegraf <Graf.Helena@web.de>
Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <a.tornede@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <44395781+alexandertornede@users.noreply.github.com>
Co-authored-by: Sarah Krebs <30651149+sarah-krebs@users.noreply.github.com>
Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: Jeroen Rook <jrook94@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@googlemail.com>

* feat: Option preventing SMAC setting up logging

* fix: Run isort

* Bump peter-evans/create-pull-request from 3 to 5 (#958)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/setup-python from 2 to 4 (#945)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: Option preventing SMAC setting up logging

* fix: Run isort

* fix: Add to changelog

* feat: Option preventing SMAC setting up logging

* fix: Run isort

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: René Sass <mail@renesass.de>
Co-authored-by: dengdifan <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Matthias Feurer <feurerm@informatik.uni-freiburg.de>
Co-authored-by: Carolin Benjamins <benjamin@tnt.uni-hannover.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Katharina Eggensperger <eggenspk@informatik.uni-freiburg.de>
Co-authored-by: Eric Kalosa-Kenyon <ekquasar@appdynamics.com>
Co-authored-by: Pascal <66594767+PascalIversen@users.noreply.github.com>
Co-authored-by: helegraf <Graf.Helena@web.de>
Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Sarah Krebs <s.krebs@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <a.tornede@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <44395781+alexandertornede@users.noreply.github.com>
Co-authored-by: Sarah Krebs <30651149+sarah-krebs@users.noreply.github.com>
Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: Jeroen Rook <jrook94@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@googlemail.com>

* Citation update (#961)

* update CITATION.cff

* update order in CITATION.cff

* fix citation date

* fix citation

* maint

* Adjust hyperband configuration distribution across brackets

* Compute the actual differences between the isb keys. (#957)

* Compute the actual differences between the isb keys.

* Added change to CHANGELOG.md

* Adjust schedule for stale reminder

* fix(logging): Prevent automatic logging setup at init (#970)

* fix(logging): Prevent automatic logging setup at init

* fix(logging): Rely on `setup_logging` to handle arg

* Fix validate method of smbo, update docstring.

* Allow callbacks to be added to a specific index, make callback registering public

* Update CHANGELOG.md

* Fix broken references (#988)

* Adapt developer install instructions to include pre-commit installation (#994)

* [Feature] Initial Design now supports executing the default config provided by the user by means of the configspace he generated. (and is no longer ignored)

* Pipe dask_client through facade for exec on hpc (#983)

* Pipe dask_client through facade for exec on hpc

* Handle pynisher's memory arg

Before: Could only pass int via SMAC with the default unit B, but now tuple/list is possible

* Update CHANGELOG.md

* Make format

* No printi

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* [Bug-fix] Pr was failing due to mutable additional configs default

* [doc-fix] the count of initial design configs is computed slightly differently

* Feature/metadata callback (#999)

* Add example for using a callback to log run metadata to a file

* Add issue number in changelog

* Changelog formatting

* Simplify metadata example

* Simplify metadata example

* Put callback in smac directory to allow importing it in custom repos

* Move callback files to callback directory

* Edit changelog

* Correct metadata callback argument types

* Additional metadata arguments in example

* Set metadata default values in callback

* Edit comment to fix PR

* Documentation/dask client example (#1001)

* Update requirements (dask_jobqueue)

* Fix broken link

* Ignore parallel example

* Add parallelization example

* Remove imports, add comment abt dask client

* Add E's information

* Update docs

* Add comment about n_workers

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Documentation/dask client example (#1001)

* Update requirements (dask_jobqueue)

* Fix broken link

* Ignore parallel example

* Add parallelization example

* Remove imports, add comment abt dask client

* Add E's information

* Update docs

* Add comment about n_workers

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Feature/dask client (#1002)

* Add info message that scenario.n_workers is ignored

When passing a dask client,
directly set n_workers in client.

* Change info to warning

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Update smac version (#1003)

* Update smac version

* Add hint on github release in make publish

* Update copyright year

* check if config in rh when storing state (#997)

* check if config in rh when storing state

* maint

* remove unnecessary changes

* Adapt developer install instructions to include pre-commit installation (#994)

* Pipe dask_client through facade for exec on hpc (#983)

* Pipe dask_client through facade for exec on hpc

* Handle pynisher's memory arg

Before: Could only pass int via SMAC with the default unit B, but now tuple/list is possible

* Update CHANGELOG.md

* Make format

* No printi

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* update changelog

* Increase tolerance for runhistory restoration test

---------

Co-authored-by: Sarah Segel <30651149+sarah-segel@users.noreply.github.com>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: Helena Graf <h.graf@ai.uni-hannover.de>

* Add a workaround to be able to pass a dataset via dask.scatter (#993)

* [feat] Support dask.scatter

* [fix] Add shared_data arg in abstract_facade

* Address the comments by Eddie

* [fix] Fix errors raised by Eddie

* [format] Apply black locally

* [fix] Get retries back to 16 as it was a mistake

* [doc] Update CHANGELOG

---------

Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>

* Adding Binder links for example (#976)

* binder

* maint

* fix dependencies

* maint docs

* Revert "maint docs"

This reverts commit 4fa1a0fae8dfa0b646e43273d50f72ddd76bf191.

* add requirement

---------

Co-authored-by: Difan Deng <deng@dengster.tnt.uni-hannover.de>

* Remove commit message from dependabot PRs (#1009)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: René Sass <mail@renesass.de>
Co-authored-by: Carolin Benjamins <benjamin@tnt.uni-hannover.de>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Katharina Eggensperger <eggenspk@informatik.uni-freiburg.de>
Co-authored-by: Matthias Feurer <feurerm@informatik.uni-freiburg.de>
Co-authored-by: Eric Kalosa-Kenyon <ekquasar@appdynamics.com>
Co-authored-by: Pascal <66594767+PascalIversen@users.noreply.github.com>
Co-authored-by: helegraf <Graf.Helena@web.de>
Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Alexander Tornede <a.tornede@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <44395781+alexandertornede@users.noreply.github.com>
Co-authored-by: Sarah Krebs <30651149+sarah-krebs@users.noreply.github.com>
Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: Jeroen Rook <jrook94@gmail.com>
Co-authored-by: Eddie Bergman <eddiebergmanhs@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@googlemail.com>
Co-authored-by: Difan Deng <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: Aron Bahram <aron.bahram@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Difan Deng <deng@dengster.tnt.uni-hannover.de>

* Fix broken link

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: René Sass <mail@renesass.de>
Co-authored-by: Carolin Benjamins <benjamin@tnt.uni-hannover.de>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Katharina Eggensperger <eggenspk@informatik.uni-freiburg.de>
Co-authored-by: Matthias Feurer <feurerm@informatik.uni-freiburg.de>
Co-authored-by: Eric Kalosa-Kenyon <ekquasar@appdynamics.com>
Co-authored-by: Pascal <66594767+PascalIversen@users.noreply.github.com>
Co-authored-by: helegraf <Graf.Helena@web.de>
Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Alexander Tornede <a.tornede@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <44395781+alexandertornede@users.noreply.github.com>
Co-authored-by: Sarah Krebs <30651149+sarah-krebs@users.noreply.github.com>
Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: Jeroen Rook <jrook94@gmail.com>
Co-authored-by: Eddie Bergman <eddiebergmanhs@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@googlemail.com>
Co-authored-by: Difan Deng <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: Aron Bahram <aron.bahram@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Difan Deng <deng@dengster.tnt.uni-hannover.de>

* Drop torch requirements (#1015)

* Remove torch requirements

* Fix format

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Remove leftover CLI entry points (#1014)

* Fix incumbent selection in case of SH+MO

* Update CHANGELOG.md

* Feature/GitHub actions pr draft (#1008)

Update the workflows only to trigger extensive tests for PRs that are not in the draft stage

---------

Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Helena Graf <h.graf@ai.uni-hannover.de>

* Update stale report to include issues with recent interactions (#1025)

* Add recently updated issues to list of reminders.

* Add recently updated issues to list of reminders.

* Add recently updated issues to list of reminders.

* Raise error if resource limitation and parallelization is requested (#1023)

* Add warnings for parallelism doc

* Check for parallelization + pynisher

Does not work together, throw error.
Does not work bc Dask pickles jobs and
pynisher runs the target function in a process.

* Fix whitespaces

---------

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* Raise an error for invalid scatter data (#1018)

* [enhance] Add an error for scatter data

* Update ChangeLog

---------

Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>

* fix(configspace): shows all keys in print (#1043)

* Fix callback order (#1040)

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>

* fix: dtypes (#1044)

* Fix(config_selector): Budget checking (#1039)

* Fix: target runner with partial func (#1045)

* Feature/improve documentation (#1028)

* Experimental instruction for installing SMAC in windows via WSL

* More detailed documentation regarding continuing runs

* Fixes

* Fixes

* Fixes

* Update docs/10_experimental.rst

Co-authored-by: Difan Deng <33290713+dengdifan@users.noreply.github.com>

* Fixes from PR

* Fixes from PR

* Fixes from PR

* Fixes from PR

* Fixes from PR

---------

Co-authored-by: Difan Deng <33290713+dengdifan@users.noreply.github.com>

* Handle configspace as dictionary in mlp example (#1057)

* Handle configspace as dictionary in mlp example

* Adapt sgd loss to newest scikit-learn version

* Add change to changelog

* Handle configspace as dictionary in parego example

* Correct get usage

* Raise version number

* Add missing period in docs.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Carolin Benjamins <benjamin@tnt.uni-hannover.de>
Co-authored-by: René Sass <mail@renesass.de>
Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: C. Benjamins <75323339+benjamc@users.noreply.github.com>
Co-authored-by: Katharina Eggensperger <eggenspk@informatik.uni-freiburg.de>
Co-authored-by: Matthias Feurer <feurerm@informatik.uni-freiburg.de>
Co-authored-by: Eric Kalosa-Kenyon <ekquasar@appdynamics.com>
Co-authored-by: Pascal <66594767+PascalIversen@users.noreply.github.com>
Co-authored-by: helegraf <Graf.Helena@web.de>
Co-authored-by: timruhkopf <timruhkopf@gmail.com>
Co-authored-by: Alexander Tornede <tornede@tnt.uni-hannover.de>
Co-authored-by: Alexander Tornede <a.tornede@ai.uni-hannover.de>
Co-authored-by: Alexander Tornede <44395781+alexandertornede@users.noreply.github.com>
Co-authored-by: Sarah Krebs <30651149+sarah-krebs@users.noreply.github.com>
Co-authored-by: helegraf <h.graf@ai.uni-hannover.de>
Co-authored-by: Jeroen Rook <jrook94@gmail.com>
Co-authored-by: Eddie Bergman <eddiebergmanhs@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@googlemail.com>
Co-authored-by: Difan Deng <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: Aron Bahram <aron.bahram@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Difan Deng <deng@dengster.tnt.uni-hannover.de>
Co-authored-by: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com>
  • Loading branch information
26 people authored and hadarshavit committed Feb 10, 2024
1 parent d2a8b38 commit e4fe208
Show file tree
Hide file tree
Showing 22 changed files with 142 additions and 45 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@

## Improvements
- Add an error when we get an empty dict data_to_scatter so that we can avoid an internal error caused in Dask precautiously
- Add an error when we get an empty dict data_to_scatter so that we can avoid an internal error caused in Dask precautiously
- Add experimental instruction for installing SMAC in Windows via a WSL.
- More detailed documentation regarding continuing runs.

## Bugfixes
- Fix bug in the incumbent selection in the case that multi-fidelity is combined with multi-objective (#1019).
- Fix callback order (#1040).

- Handle configspace as dictionary in mlp and parego example.
- Adapt sgd loss to newest scikit-learn version.

# 2.0.1

Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ date-released: "2016-08-17"
url: "https://automl.github.io/SMAC3/master/index.html"
repository-code: "https://github.com/automl/SMAC3"

version: "2.0.1"
version: "2.0.2"

type: "software"
keywords:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL := /bin/bash

NAME := SMAC3
PACKAGE_NAME := smac
VERSION := 2.0.1
VERSION := 2.0.2

DIR := "${CURDIR}"
SOURCE_DIR := ${PACKAGE_NAME}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/wrappers/v20.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class Version20(Wrapper):
supported_versions: list[str] = ["2.0.1"]
supported_versions: list[str] = ["2.0.2"]

def __init__(self, task: Task, seed: int) -> None:
super().__init__(task, seed)
Expand Down
48 changes: 48 additions & 0 deletions docs/10_experimental.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Experimental
============

.. warning::
This part is experimental and might not work in each case. If you would like to suggest any changes, please let us know.


Installation in Windows via WSL
------------------------------

SMAC can be installed in a WSL (Windows Subsystem for Linux) under Windows.

**1) Install WSL under Windows**

Install WSL under Windows. This SMAC installation workflow was tested with Ubuntu 18.04. For Ubuntu 20.04,
it has been observed that the SMAC installation results in a segmentation fault (core dumped).

**2) Get Anaconda**

Download an Anaconda Linux version to drive D under Windows, e.g. D:\\Anaconda3-2023.03-1-Linux-x86_64

In the WSL, Windows resources are mounted under /mnt:

.. code:: bash
cd /mnt/d
bash Anaconda3-2023.03-1-Linux-x86_64
Enter this command to create the environment variable:

.. code:: bash
export PATH="$PATH:/home/${USER}/anaconda3/bin
Input 'python' to check if the installation was successful.
**3) Install SMAC**
Change to your home folder and install the general software there:
.. code:: bash
cd /home/${USER}
sudo apt-get install software-properties-common
sudo apt-get update
sudo apt-get install build-essential swig
conda install gxx_linux-64 gcc_linux-64 swig
curl https://raw.githubusercontent.com/automl/smac3/master/requirements.txt | xargs -n 1 -L 1 pip install
8 changes: 8 additions & 0 deletions docs/1_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ You must have `conda >= 4.9` installed. To update conda or check your current co
Read `SMAC feedstock <https://github.com/conda-forge/smac-feedstock>`_ for more details.

Windows via WSL (Experimental)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SMAC can be installed under Windows in a WSL (Windows Subsystem for Linux).
You can find an instruction on how to do this here: :ref:`Experimental<Experimental>`.
However, this is experimental and might not work in each case.
If you would like to suggest any changes, please let us know.
19 changes: 14 additions & 5 deletions docs/advanced_usage/10_continue.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
Continue
========

SMAC automatically restores states where it left off if a run was interrupted or finished. To do so, it reads in old
files (derived from scenario's name, output_directory and seed) and sets the components.
SMAC can automatically restore states where it left off if a run was interrupted or prematurely finished. To do so,
it reads in old files (derived from scenario's name, output_directory and seed) and obtains the scenario information
of the previous run from those to continue the run.

The behavior can be controlled by setting the parameter ``overwrite`` in the facade to True or False, respectively:

* If set to True, SMAC overwrites the run results if a previous run is found that is consistent in the meta data with the current setup.
* If set to False and a previous run is found that

* is consistent in the meta data, the run is continued.
* is not consistent in the meta data, the user is asked for the exact behaviour (overwrite completely or rename old run first).

.. warning::

If you changed any code and specified a name, SMAC will ask you whether you still want to resume or
delete the old run completely. If you did not specify a name, SMAC generates a new name and the old run is
not affected.
If you changed any code affecting the run's meta data and specified a name, SMAC will ask you whether you still
want to overwrite the old run or rename the old run first. If you did not specify a name, SMAC generates a new name
and the old run is not affected.


Please have a look at our :ref:`continue example<Continue an Optimization>`.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"version": version,
"versions": {
f"v{version}": "#",
"v2.0.1": "https://automl.github.io/SMAC3/v2.0.1/",
"v2.0.0": "https://automl.github.io/SMAC3/v2.0.0/",
"v2.0.0b1": "https://automl.github.io/SMAC3/v2.0.0b1/",
"v2.0.0a2": "https://automl.github.io/SMAC3/v2.0.0a2/",
Expand Down
12 changes: 10 additions & 2 deletions examples/1_basics/5_continue.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
Continue an Optimization
^^^^^^^^^^^^^^^^^^^^^^^^
SMAC can also be continued. In this example, an optimization of a simple quadratic
function is continued. We use a custom callback, to artificially stop the first optimization.
SMAC can also be continued from a previous run. To do so, it reads in old files (derived from scenario's name,
output_directory and seed) and sets the corresponding components. In this example, an optimization of a simple quadratic
function is continued.
First, after creating a scenario with 50 trials, we run SMAC with overwrite=True. This will
overwrite any previous runs (in case the example was called before). We use a custom callback to artificially stop
this first optimization after 10 trials.
Second, we again run the SMAC optimization using the same scenario, but this time with overwrite=False. As
there already is a previous run with the same meta data, this run will be continued until the 50 trials are reached.
"""

from __future__ import annotations
Expand Down
6 changes: 3 additions & 3 deletions examples/2_multi_fidelity/1_mlp_epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def train(self, config: Configuration, seed: int = 0, budget: int = 25) -> float
# For deactivated parameters (by virtue of the conditions),
# the configuration stores None-values.
# This is not accepted by the MLP, so we replace them with placeholder values.
lr = config["learning_rate"] if config["learning_rate"] else "constant"
lr_init = config["learning_rate_init"] if config["learning_rate_init"] else 0.001
batch_size = config["batch_size"] if config["batch_size"] else 200
lr = config.get("learning_rate", "constant")
lr_init = config.get("learning_rate_init", 0.001)
batch_size = config.get("batch_size", 200)

with warnings.catch_warnings():
warnings.filterwarnings("ignore")
Expand Down
2 changes: 1 addition & 1 deletion examples/2_multi_fidelity/2_sgd_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def train(self, config: Configuration, instance: str, seed: int = 0) -> float:

# SGD classifier using given configuration
clf = SGDClassifier(
loss="log",
loss="log_loss",
penalty="elasticnet",
alpha=config["alpha"],
l1_ratio=config["l1_ratio"],
Expand Down
6 changes: 3 additions & 3 deletions examples/3_multi_objective/2_parego.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def configspace(self) -> ConfigurationSpace:
return cs

def train(self, config: Configuration, seed: int = 0, budget: int = 10) -> dict[str, float]:
lr = config["learning_rate"] if config["learning_rate"] else "constant"
lr_init = config["learning_rate_init"] if config["learning_rate_init"] else 0.001
batch_size = config["batch_size"] if config["batch_size"] else 200
lr = config.get("learning_rate", "constant")
lr_init = config.get("learning_rate_init", 0.001)
batch_size = config.get("batch_size", 200)

start_time = time.time()

Expand Down
2 changes: 1 addition & 1 deletion smac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Copyright {datetime.date.today().strftime('%Y')}, Marius Lindauer, Katharina Eggensperger,
Matthias Feurer, André Biedenkapp, Difan Deng, Carolin Benjamins, Tim Ruhkopf, René Sass
and Frank Hutter"""
version = "2.0.1"
version = "2.0.2"


try:
Expand Down
6 changes: 4 additions & 2 deletions smac/facade/abstract_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ class AbstractFacade:
Callbacks, which are incorporated into the optimization loop.
overwrite: bool, defaults to False
When True, overwrites the run results if a previous run is found that is
inconsistent in the meta data with the current setup. If ``overwrite`` is set to False, the user is asked
for the exact behaviour (overwrite completely, save old run, or use old results).
consistent in the meta data with the current setup. When False and a previous run is found that is
consistent in the meta data, the run is continued. When False and a previous run is found that is
not consistent in the meta data, the the user is asked for the exact behaviour (overwrite completely
or rename old run first).
dask_client: Client | None, defaults to None
User-created dask client, which can be used to start a dask cluster and then attach SMAC to it. This will not
be closed automatically and will have to be closed manually if provided explicitly. If none is provided
Expand Down
16 changes: 8 additions & 8 deletions smac/main/config_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,14 @@ def _collect_data(self) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
assert self._runhistory_encoder is not None

# If we use a float value as a budget, we want to train the model only on the highest budget
available_budgets = []
for run_key in self._runhistory:
budget = run_key.budget
if budget not in available_budgets:
available_budgets.append(run_key.budget)

# Sort available budgets from highest to lowest budget
available_budgets = sorted(list(set(available_budgets)), reverse=True) # type: ignore
unique_budgets: set[float] = {run_key.budget for run_key in self._runhistory if run_key.budget is not None}

available_budgets: list[float] | list[None]
if len(unique_budgets) > 0:
# Sort available budgets from highest to lowest budget
available_budgets = sorted(unique_budgets, reverse=True)
else:
available_budgets = [None]

# Get #points per budget and if there are enough samples, then build a model
for b in available_budgets:
Expand Down
2 changes: 1 addition & 1 deletion smac/main/smbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def _initialize_state(self) -> None:
logger.info("Since the previous run was not successful, SMAC will start from scratch again.")
self.reset()
else:
# Here, we run into differen scenarios
# Here, we run into different scenarios
diff = recursively_compare_dicts(
Scenario.make_serializable(self._scenario),
Scenario.make_serializable(old_scenario),
Expand Down
8 changes: 4 additions & 4 deletions smac/model/gaussian_process/kernels/base_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ def _signature(self, func: Callable) -> Signature:

def _set_active_dims(self, operate_on: np.ndarray | None = None) -> None:
"""Sets dimensions this kernel should work on."""
if operate_on is not None and type(operate_on) in (list, np.ndarray):
if operate_on is not None and isinstance(operate_on, (list, np.ndarray)):
if not isinstance(operate_on, np.ndarray):
raise TypeError("The argument `operate_on` needs to be of type np.ndarray but is %s" % type(operate_on))
raise TypeError(f"The argument `operate_on` needs to be of type np.ndarray but is {type(operate_on)}")

if operate_on.dtype != int:
raise ValueError("The dtype of argument `operate_on` needs to be int, but is %s" % operate_on.dtype)
if not np.issubdtype(operate_on.dtype, np.integer):
raise ValueError(f"The dtype of `operate_on` needs to be np.integer, but is {operate_on.dtype}")

self.operate_on = operate_on
self._len_active = len(operate_on)
Expand Down
6 changes: 3 additions & 3 deletions smac/runhistory/runhistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,15 @@ def get_min_cost(self, config: Configuration) -> float:
cost = self._min_cost_per_config.get(config_id, np.nan) # type: ignore

if self._n_objectives > 1:
assert type(cost) == list
assert isinstance(cost, list)
assert self.multi_objective_algorithm is not None

costs = normalize_costs(cost, self._objective_bounds)

# Note: We have to mean here because we already got the min cost
return self.multi_objective_algorithm(costs)

assert type(cost) == float
assert isinstance(cost, float)
return float(cost)

def average_cost(
Expand Down Expand Up @@ -847,7 +847,7 @@ def load(self, filename: str | Path, configspace: ConfigurationSpace) -> None:
for entry in data["data"]:
# Set n_objectives first
if self._n_objectives == -1:
if isinstance(entry[4], float) or isinstance(entry[4], int):
if isinstance(entry[4], (float, int)):
self._n_objectives = 1
else:
self._n_objectives = len(entry[4])
Expand Down
13 changes: 12 additions & 1 deletion smac/runner/target_function_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import math
import time
import traceback
from functools import partial

import numpy as np
from ConfigSpace import Configuration
Expand Down Expand Up @@ -88,7 +89,17 @@ def __init__(
@property
def meta(self) -> dict[str, Any]: # noqa: D102
meta = super().meta
meta.update({"code": str(self._target_function.__code__.co_code)})

# Partial's don't have a __code__ attribute but are a convenient
# way a user might want to pass a function to SMAC, specifying
# keyword arguments.
f = self._target_function
if isinstance(f, partial):
f = f.func
meta.update({"code": str(f.__code__.co_code)})
meta.update({"code-partial-args": repr(f)})
else:
meta.update({"code": str(self._target_function.__code__.co_code)})

return meta

Expand Down
17 changes: 11 additions & 6 deletions smac/utils/configspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,17 @@ def print_config_changes(
if incumbent is None or challenger is None:
return

params = sorted([(param, incumbent[param], challenger[param]) for param in challenger.keys()])
for param in params:
if param[1] != param[2]:
logger.info("--- %s: %r -> %r" % param)
else:
logger.debug("--- %s Remains unchanged: %r", param[0], param[1])
inc_keys = set(incumbent.keys())
all_keys = inc_keys.union(challenger.keys())

lines = []
for k in sorted(all_keys):
inc_k = incumbent.get(k, "-inactive-")
cha_k = challenger.get(k, "-inactive-")
lines.append(f"--- {k}: {inc_k} -> {cha_k}" + " (unchanged)" if inc_k == cha_k else "")

msg = "\n".join(lines)
logger.debug(msg)


# def check_subspace_points(
Expand Down
2 changes: 1 addition & 1 deletion smac/utils/multi_objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def normalize_costs(

costs = []
for v, b in zip(values, bounds):
assert type(v) != list
assert not isinstance(v, list)
p = v - b[0]
q = b[1] - b[0]

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def train(self, config: Configuration, instance: str = "0-1", budget: float = 1,

# SGD classifier using given configuration
clf = SGDClassifier(
loss="log",
loss="log_loss",
penalty="elasticnet",
alpha=config["alpha"],
l1_ratio=config["l1_ratio"],
Expand Down

0 comments on commit e4fe208

Please sign in to comment.