Skip to content

Commit

Permalink
Version 1.1.1 (#793)
Browse files Browse the repository at this point in the history
* Added comparison between SMAC and similar tools.
* Updated installation guide.
* Added a warning that CLI is only available when installing from GitHub.

Co-authored-by: Carolin Benjamins <[email protected]>
Co-authored-by: Difan Deng <[email protected]>
  • Loading branch information
3 people authored Nov 5, 2021
1 parent b2e0a65 commit d4cb7ed
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 45 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.1.1

## Minor Changes
* Added comparison between SMAC and similar tools.
* Updated installation guide.
* Added a warning that CLI is only available when installing from GitHub.


# 1.1

## Features
Expand Down
5 changes: 0 additions & 5 deletions docs/pages/getting_started/comparison.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/pages/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Getting Started
installation
minimal_example
package_overview
comparison
basic_usage


Expand Down
29 changes: 15 additions & 14 deletions docs/pages/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,30 @@ Or alternatively, clone the environment from GitHub directly:
pip install .
Optional Dependencies
~~~~~~~~~~~~~~~~~~~~~
.. warning::

SMAC comes with a set of optional dependencies that can be installed using `setuptools
extras <https://setuptools.pypa.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies>`_:
Please note that calling SMAC via :term:`CLI` is only available when installing from GitHub. We
refer to :ref:`Branin` for more details.

- `lhd`: Latin Hypercube Design
- `gp`: Gaussian Process Models

These can be installed from PyPI or manually:

.. code-block::
Conda-forge
~~~~~~~~~~~

pip install smac[gp,lhd]
Installing SMAC from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:

.. code-block::
.. code:: bash
pip install .[gp,lhd]
conda config --add channels conda-forge
conda config --set channel_priority strict
For convenience, there is also an all meta-dependency that installs ``all`` optional dependencies:
.. code-block::
You must have `conda >= 4.9` installed. To update conda or check your current conda version, please follow the instructions from `the official anaconda documentation <https://docs.anaconda.com/anaconda/install/update-version/>`_ . Once the `conda-forge` channel has been enabled, SMAC can be installed with:

.. code:: bash
pip install smac[all]
conda install smac
Read `SMAC feedstock <https://github.com/conda-forge/smac-feedstock>`_ for more details.

27 changes: 24 additions & 3 deletions docs/pages/getting_started/package_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Any objectives
Find well-performing hyperparameter configurations not only for one instance (e.g. dataset) of
an algorithm, but for many.

Commandline
Commandline (:term:`CLI`)
SMAC can not only be executed within a python file but also from the commandline. Consequently,
not only algorithms in python can be optimized but in other languages as well.

Expand All @@ -58,6 +58,27 @@ Intensification
- Successive Halving
- Hyperband

Please see the following figure for a more detailed overview:
Please see the following figure for a more detailed overview.

.. figure:: ../../images/components.png


Comparison
~~~~~~~~~~
The following table provides an overview of SMAC's capabilities in comparison with other optimization tools.

.. csv-table::
:header: "Package", "Complex Hyperparameter Spaces", "Multi-:term:`Objective` ", ":term:`Multi-Fidelity<MF>`", ":ref:`Instances<Instances and Features>`", ":term:`CLI`", "Parallelism"
:widths: 14, 14, 14, 14, 14, 14, 14

HyperMapper, ✅, ✅, ❌, ❌, ❌, ❌
Optuna, ✅, ✅, ❌, ❌, ✅, ✅
Hyperopt, ✅, (✅) †, ❌, ❌, ✅, ✅
BoTorch, ❌, ✅, ✅, ❌, ❌, ✅
OpenBox, ✅, ✅, ❌, ❌, ❌, ✅
HpBandSter, ✅, (✅) †, ✅, ❌, ❌, ✅
SMAC, ✅, (✅) †, ✅, ✅, ✅, ✅

† Indirectly supported. For example, it can be implemented directly inside the :term:`TAE` by weighting costs.


.. figure:: ../../images/components.png
5 changes: 4 additions & 1 deletion docs/pages/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ Glossary
enough to make it the new current best known configuration (the incumbent).

CV
Cross-Validation.
Cross-Validation.

CLI
Command-Line Interface.
2 changes: 1 addition & 1 deletion examples/python/synthetic_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def rosenbrock_2d(x):
smac = SMAC4BB(scenario=scenario,
model_type=model_type,
rng=np.random.RandomState(42),
acquisition_func=EI, # or others like PI, LCB as acquisition functions
acquisition_function=EI, # or others like PI, LCB as acquisition functions
tae_runner=rosenbrock_2d)

smac.optimize()
3 changes: 0 additions & 3 deletions extras_require.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"gpmcmc": [
"emcee>=3.0.0"
],
"documentation": [
"sphinx==4.2.0",
"sphinx-gallery==0.10.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ scikit-learn>=0.22.0
pyrfr>=0.8.0
dask
distributed
emcee
emcee>=3.0.0
6 changes: 2 additions & 4 deletions smac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

__copyright__ = "Copyright 2021, AutoML.org Freiburg-Hannover"
__license__ = "3-clause BSD"
__version__ = '1.1'
__version__ = '1.1.1'
__author__ = 'Marius Lindauer, Katharina Eggensperger, Matthias Feurer, André Biedenkapp, ' \
'Difan Deng, Carolin Benjamins, René Sass ' \
'and Frank Hutter'
Expand All @@ -18,12 +18,10 @@
with open(os.path.join(os.path.dirname(__file__), 'extras_require.json')) as fh:
extras_require = json.load(fh)

extras_installed = set()
extras_installed = set() # type: set
for name, requirements in extras_require.items():
if name in ['documentation', 'test']:
continue
if dependencies.are_valid_packages(requirements):
extras_installed.add(name)

if sys.version_info < (3, 7, 0):
raise ValueError("SMAC requires Python 3.7.0 or newer.")
Expand Down
9 changes: 0 additions & 9 deletions smac/utils/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
r'^(?P<name>[\w\-]+)%s?(,%s)?$' % (SUBPATTERN % (1, 1), SUBPATTERN % (2, 2)))


def are_valid_packages(packages: typing.Union[typing.List[str], str]) -> bool:
try:
verify_packages(packages)
except (MissingPackageError, IncorrectPackageVersionError):
return False
else:
return True


def verify_packages(packages: typing.Union[typing.List[str], str]) -> None:
if not packages:
return
Expand Down
3 changes: 0 additions & 3 deletions test/test_epm/test_gp_mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
from smac.epm.gaussian_process_mcmc import GaussianProcessMCMC
from smac.epm.gp_base_prior import LognormalPrior, HorseshoePrior

from test import requires_extra

__copyright__ = "Copyright 2021, AutoML.org Freiburg-Hannover"
__license__ = "3-clause BSD"

Expand Down Expand Up @@ -62,7 +60,6 @@ def get_gp(n_dimensions, rs, noise=1e-3, normalize_y=True, average_samples=False
return model


@requires_extra('gpmcmc')
class TestGPMCMC(unittest.TestCase):
def test_predict_wrong_X_dimensions(self):
rs = np.random.RandomState(1)
Expand Down

0 comments on commit d4cb7ed

Please sign in to comment.