Skip to main content

SMAC3, a Python implementation of 'Sequential Model-based Algorithm Configuration'.

Project description

SMAC v3 Project

Copyright (C) 2016-2021 AutoML Group

Attention: This package is a reimplementation of the original SMAC tool (see reference below). However, the reimplementation slightly differs from the original SMAC. For comparisons against the original SMAC, we refer to a stable release of SMAC (v2) in Java which can be found here.

The documentation can be found here.

Status for master branch: Tests Docs examples codecov Status

Status for the development branch Tests Docs examples codecov

Try SMAC directly in your Browser Open in Colab

OVERVIEW

SMAC is a tool for algorithm configuration to optimize the parameters of arbitrary algorithms across a set of instances. This also includes hyperparameter optimization of ML algorithms. The main core consists of Bayesian Optimization in combination with an aggressive racing mechanism to efficiently decide which of two configurations performs better.

For a detailed description of its main idea, we refer to

Hutter, F. and Hoos, H. H. and Leyton-Brown, K.
Sequential Model-Based Optimization for General Algorithm Configuration
In: Proceedings of the conference on Learning and Intelligent OptimizatioN (LION 5)

SMAC v3 is written in Python3 and continuously tested with Python 3.7, 3.8 and 3.9. Its Random Forest is written in C++.

Installation

Requirements

Besides the listed requirements (see requirements.txt), the random forest used in SMAC3 requires SWIG as a build dependency:

apt-get install swig

On Arch Linux (or any distribution with swig4 as default implementation):

pacman -Syu swig3
ln -s /usr/bin/swig-3 /usr/bin/swig

Installation via pip

SMAC3 is available on PyPI.

pip install smac

Manual Installation

git clone https://github.com/automl/SMAC3.git && cd SMAC3
cat requirements.txt | xargs -n 1 -L 1 pip install
pip install .

Installation in Anaconda

If you use Anaconda as your Python environment, you have to install three packages before you can install SMAC:

conda install gxx_linux-64 gcc_linux-64 swig

Optional dependencies

SMAC3 comes with a set of optional dependencies that can be installed using setuptools extras:

  • lhd: Latin hypercube design
  • gp: Gaussian process models

These can be installed from PyPI or manually:

# from PyPI
pip install smac[gp]

# manually
pip install .[gp,lhd]

For convenience, there is also an all meta-dependency that installs all optional dependencies:

pip install smac[all]

License

This program is free software: you can redistribute it and/or modify it under the terms of the 3-clause BSD license (please see the LICENSE file).

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You should have received a copy of the 3-clause BSD license along with this program (see LICENSE file). If not, see https://opensource.org/licenses/BSD-3-Clause.

USAGE

The usage of SMAC v3 is mainly the same as provided with SMAC v2.08. It supports the same parameter configuration space syntax (except for extended forbidden constraints) and interface to target algorithms.

Examples

We provide a bunch of examples in the examples folder, such as:

An overview of all examples can be seen in our documentation.

Contact

SMAC3 is developed by the AutoML Groups of the Universities of Hannover and Freiburg.

If you found a bug, please report to https://github.com/automl/SMAC3/issues.

Our guidelines for contributing to this package can be found here

SMAC License

============

BSD 3-Clause License

Copyright (c) 2016-2018, Ml4AAD Group (http://www.ml4aad.org/) All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

License of other files

======================

RoBO

Gaussian process files are built on code from RoBO and/or are copied from RoBO: https://github.com/automl/RoBO

smac/epm/gaussian_process.py smac/epm/gaussian_process_mcmc.py smac/epm/gp_base_prior.py smac/epm/gp_default_priors.py

License:

Copyright (c) 2015, automl All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of RoBO nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smac-0.14.0.tar.gz (223.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smac-0.14.0-py3-none-any.whl (207.0 kB view details)

Uploaded Python 3

File details

Details for the file smac-0.14.0.tar.gz.

File metadata

  • Download URL: smac-0.14.0.tar.gz
  • Upload date:
  • Size: 223.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for smac-0.14.0.tar.gz
Algorithm Hash digest
SHA256 6dca1e77e8120e1bcac61649214652c0720378c770d0b085c0d66078a232c5ac
MD5 572f9c928ca98c6740ca4d434df71de3
BLAKE2b-256 05fa76b235f8101032dfde45bbebcd360df851bb901095c95a40a07fb222a8ad

See more details on using hashes here.

File details

Details for the file smac-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: smac-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 207.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for smac-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8a7a861c01f7a0491e88d191b36d4b7e0288fafec618638d627411c015be199
MD5 822928468ab836d25ece9c9b7d3b16d3
BLAKE2b-256 d2bbdf10c6eedf7b9ae80e879576a654c105f35a8c8fe54c43d147e3fc8ea5bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page