Registry / ai-ml / emukit

emukit

JSON →
library0.5.1pypypi✓ verified 88d ago

A Python toolkit for decision-making under uncertainty, including Bayesian optimization, experimental design, and quadrature. Current version 0.5.1, requires Python >=3.10. Released approximately twice per year since 2018.

pip install emukit
INSTALL
IMPORT
SIG · EMUKIT
E
emukit
ai-mlpythonv0.5.1
Install
13.6s avg
Import
2063ms
Disk
360MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.5.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
2/3 runs
✓ 12.53s
py 3.11
2/3 runs
✓ 12.03s
py 3.12
1/3 runs
✓ 11.83s
py 3.13
1/3 runs
2/3 runs
py 3.9
✓ —
✓ 17.93s
360MB installed
● package 360MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BayesianOptimizationLoop
✓ from emukit.bayesian_optimization.loops import BayesianOptimizationLoop
✗ from emukit.bayesian_optimization import BayesianOptimizationLoop
BayesianOptimizationLoop is in emukit.bayesian_optimization.loops, not the top-level of the module.
create_initial_design
✓ from emukit.experimental_design.model_free.latin_design import LatinDesign
✗ from emukit.experimental_design import LatinDesign
LatinDesign is in emukit.experimental_design.model_free.latin_design.
GPyModel
✓ from emukit.model_wrappers import GPyModel
✗ from emukit.models import GPyModel
Model wrappers live in emukit.model_wrappers, not emukit.models.
QuadratureCaratheodoryMeasure
✓ from emukit.quadrature.kernels import QuadratureCaratheodoryMeasure
✗ from emukit.quadrature import QuadratureCaratheodoryMeasure
Quadrature kernel/measure classes are in emukit.quadrature.kernels.

Minimal Bayesian optimization loop using Emukit with a GPy model.

import numpy as np from emukit.core import ContinuousParameter, ParameterSpace from emukit.model_wrappers import GPyModelWrapper from emukit.bayesian_optimization.loops import BayesianOptimizationLoop from emukit.core.acquisition import ExpectedImprovement # Define a simple objective def objective(x): return x**2 # Parameter space space = ParameterSpace([ContinuousParameter('x', -5, 5)]) # Initial data X_init = np.random.uniform(-5, 5, (3, 1)) Y_init = objective(X_init) # Model gpy_model = GPyModelWrapper(X_init, Y_init) # Acquisition function ei = ExpectedImprovement() # Optimization loop loop = BayesianOptimizationLoop(space, gpy_model, acquisition=ei) # Run one iteration new_x = loop.get_next_points([X_init, Y_init]) print('Suggested next point:', new_x)
Debug
Known issues
breakingEmukit 0.5.0 dropped support for Python <3.10. Also, numpy>=2.0 compatibility now requires using emukit core without GPy (GPy is pinned to numpy<2.0).
fix
Upgrade to Python >=3.10. For numpy>=2.0, install emukit without gpy extra and use sklearn GP wrapper instead.
affects: >=0.5.0
gotchaThe GPy model wrapper in emukit.model_wrappers.GPyModel expects X and Y arrays; do not pass GPy objects directly.
fix
Use from emukit.model_wrappers import GPyModelWrapper and pass numpy arrays.
affects: all
gotchaBayesianOptimizationLoop requires the 'get_next_points' method to receive a list of (X, Y) tuples, not just the model.
fix
Pass loop.get_next_points([X, Y]) with X and Y as 2D arrays.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'emukit.bayesian_optimization'
Import path is wrong; the correct import is from emukit.bayesian_optimization.loops.
fix
Use: from emukit.bayesian_optimization.loops import BayesianOptimizationLoop
AttributeError: module 'emukit' has no attribute 'model_wrappers'
Misspelled 'emukit' or installed the wrong package; also GPy may be missing.
fix
pip install emukit[gpy] or pip install emukit[sklearn] for sklearn wrapper.
ValueError: The number of points in X and Y must be the same
Passed X and Y arrays with mismatched first dimension.
fix
Ensure X.shape[0] == Y.shape[0]; both must be 2D arrays (n_samples, n_dims).
ImportError: cannot import name 'GPyModel' from 'emukit.model_wrappers'
Incorrect class name; should be GPyModelWrapper.
fix
Use: from emukit.model_wrappers import GPyModelWrapper
Upgrade
Version history
0.5.1latest on PyPI · released Feb 22, 2026
Audit
Dependencies
GPyoptionalDefault Gaussian process backend; pinned to numpy<2.0
scikit-learnoptionalOptional GP backend via wrapper
bnnoptionalOptional Bayesian neural network backend
Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
emukit — pip install emukit · libregistry