The Developer API is suitable when the user wants maximal customization of the optimization loop. This tutorial demonstrates optimization of a Hartmann6 function using the
SimpleExperiment construct, which we use for synchronous experiments, where trials can be evaluated right away.
For more details on the different Ax constructs, see the "Building Blocks of Ax" tutorial.
import numpy as np from ax import ( ComparisonOp, ParameterType, RangeParameter, SearchSpace, SimpleExperiment, OutcomeConstraint, ) from ax.metrics.l2norm import L2NormMetric from ax.modelbridge.registry import Models from ax.plot.contour import plot_contour from ax.plot.trace import optimization_trace_single_method from ax.utils.measurement.synthetic_functions import hartmann6 from ax.utils.notebook.plotting import render, init_notebook_plotting init_notebook_plotting()
[INFO 09-24 14:50:21] ipy_plotting: Injecting Plotly library into cell. Do not overwrite or delete cell.