diff --git a/changelog.md b/changelog.md index ac9f8777c..6f71711b9 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/docs/pages/getting_started/comparison.rst b/docs/pages/getting_started/comparison.rst deleted file mode 100644 index 5dbacba6a..000000000 --- a/docs/pages/getting_started/comparison.rst +++ /dev/null @@ -1,5 +0,0 @@ -Comparison -========== - -.. note:: - This page is under construction. \ No newline at end of file diff --git a/docs/pages/getting_started/index.rst b/docs/pages/getting_started/index.rst index a590e4fa9..2926faaf7 100644 --- a/docs/pages/getting_started/index.rst +++ b/docs/pages/getting_started/index.rst @@ -7,7 +7,6 @@ Getting Started installation minimal_example package_overview - comparison basic_usage diff --git a/docs/pages/getting_started/installation.rst b/docs/pages/getting_started/installation.rst index cec45a628..b74afdcd4 100644 --- a/docs/pages/getting_started/installation.rst +++ b/docs/pages/getting_started/installation.rst @@ -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 `_: + 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 `_ . 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 `_ for more details. \ No newline at end of file diff --git a/docs/pages/getting_started/package_overview.rst b/docs/pages/getting_started/package_overview.rst index 622e04a89..cfb3bd86b 100644 --- a/docs/pages/getting_started/package_overview.rst +++ b/docs/pages/getting_started/package_overview.rst @@ -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. @@ -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`", ":ref:`Instances`", ":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 \ No newline at end of file diff --git a/docs/pages/glossary.rst b/docs/pages/glossary.rst index 21a4e37eb..ff512804e 100644 --- a/docs/pages/glossary.rst +++ b/docs/pages/glossary.rst @@ -58,4 +58,7 @@ Glossary enough to make it the new current best known configuration (the incumbent). CV - Cross-Validation. \ No newline at end of file + Cross-Validation. + + CLI + Command-Line Interface. \ No newline at end of file diff --git a/examples/python/synthetic_function.py b/examples/python/synthetic_function.py index 6576cd27f..cd778e1b3 100644 --- a/examples/python/synthetic_function.py +++ b/examples/python/synthetic_function.py @@ -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() diff --git a/extras_require.json b/extras_require.json index 93cf6c80e..bd3682751 100644 --- a/extras_require.json +++ b/extras_require.json @@ -1,7 +1,4 @@ { - "gpmcmc": [ - "emcee>=3.0.0" - ], "documentation": [ "sphinx==4.2.0", "sphinx-gallery==0.10.0", diff --git a/requirements.txt b/requirements.txt index cd0e0369b..b803c5a3a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ scikit-learn>=0.22.0 pyrfr>=0.8.0 dask distributed -emcee +emcee>=3.0.0 diff --git a/smac/__init__.py b/smac/__init__.py index fe2fd015d..c399b43a6 100644 --- a/smac/__init__.py +++ b/smac/__init__.py @@ -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' @@ -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.") diff --git a/smac/utils/dependencies.py b/smac/utils/dependencies.py index abc6bdba7..27d66c39e 100644 --- a/smac/utils/dependencies.py +++ b/smac/utils/dependencies.py @@ -13,15 +13,6 @@ r'^(?P[\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 diff --git a/test/test_epm/test_gp_mcmc.py b/test/test_epm/test_gp_mcmc.py index e06d74467..e7e30af16 100644 --- a/test/test_epm/test_gp_mcmc.py +++ b/test/test_epm/test_gp_mcmc.py @@ -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" @@ -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)