Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python library for Bayesian Optimization.

Project Description


A python library for Bayesian Optimization.

Setup BOlib

  • The following packages must be installed before installing BOlib
# for ptyhon3
apt-get install python3-tk
# or for python2
apt-get install python-tk
# gfortran is required if DIRECT optimizer is needed
apt-get install gfortran
# is also recommended to install libopenblas-base for multi-core systems
apt-get install libopenblas-base
  • Create and activate virtualenv (for python2) or venv (for ptyhon3)
# for ptyhon3
python3 -m venv --system-site-packages .env
# or for python2
virtualenv --system-site-packages .env

source .env/bin/activate
  • Upgrade pip
# for ptyhon3
python3 -m pip install --upgrade pip
# or for python2
python -m pip install --upgrade pip
  • Install BOlib package
python -m pip install bolib
# if DIRECT optimizer is needed
python -m pip install bolib[direct]

Run BOlib

  • Create an example configuration
vi example/example_config.json
  "of": "branin",
  "solver": {
    "module": "bayesian_optimization",
    "optimizer": {
      "module": "random_grid",
      "initial_sample": 10
    "af": {
      "module": "ei",
      "xi": 0.001
    "model": {
      "module": "gaussian_process",
      "fit": {
        "module": "hparam_optimization",
        "noiseless": 1,
        "restarts": 10,
        "opt": 1,
        "estimator": "ML"
      "kernel": "squared_exponential"
  • Run example
bolib run --input example/example_config.json --output output.json --verbose
  • Generate an animation of the previous experiment
bolib view --input output.json --output output.gif

Use BOlib as a library

  • You can also install BOlib and use its modules in your python script
import as GP
  • Hint: Try the following line to execute with the working directory in the current location of the bash:
python -m bolib run --input example/example_config.json --output output.json --verbose

Extend BOlib with your own modules

  • You can also add you own modules. BOlib imports modules from the current working directory. Edit the example_config.json as follows

Develop BOlib

  • Download the repository using git
git clone
cd bolib
git config 'MAIL'
git config 'NAME'
git config credential.helper 'cache --timeout=300'
git config push.default simple
  • The following packages must be installed after installing BOlib
python -m pip install bolib twine wheel
  • Upload distribution
python sdist bdist_wheel
twine upload dist/*
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bolib-0.17.2-py2.py3-none-any.whl (14.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Oct 26, 2017
bolib-0.17.2.tar.gz (19.0 kB) Copy SHA256 Checksum SHA256 Source Oct 26, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting