Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.43 KB

botorch_readme.md

File metadata and controls

41 lines (27 loc) · 1.43 KB

BoTorch Logo

SBArchOpt Interface to BoTorch: Bayesian Optimization with PyTorch

BoTorch is a Bayesian optimization framework written on top of the PyTorch machine learning library. More information:

Bandalat, M. et al, "BoTorch: A Framework for Efficient Monte-Carlo Bayesian Optimization", https://arxiv.org/abs/1910.06403

The framework is mostly interacted with through Ax.

Installation

pip install -e .[botorch]

Usage

The get_botorch_interface function can be used to get an interface object that can be used to create an OptimizationLoop instance, with correctly configured search space, optimization configuration, and evaluation function.

Ax will take care of selecting the best underlying Bayesian (GP) model for the defined optimization problem. Note that it will always be some Gaussian Process model and therefore can be relatively expensive.

from sb_arch_opt.algo.botorch_interface import get_botorch_interface

problem = ...  # Subclass of ArchOptProblemBase

# Get the interface and optimization loop
interface = get_botorch_interface(problem)
opt_loop = interface.get_optimization_loop(n_init=100, n_infill=50)

# Run the optimization loop until completion
opt_loop.full_run()

# Extract data as a pymoo Population object
pop = interface.get_population(opt_loop)