The loop API is the most lightweight way to do optimization in Ax. The user makes one call to optimize
, which performs all of the optimization under the hood and returns the optimized parameters.
For more customizability of the optimization procedure, consider the Service or Developer API.
import numpy as np
from ax.metrics.branin import branin
from ax.plot.contour import plot_contour
from ax.plot.trace import optimization_trace_single_method
from ax.service.managed_loop import optimize
from ax.utils.measurement.synthetic_functions import hartmann6
from ax.utils.notebook.plotting import init_notebook_plotting, render
init_notebook_plotting()
[INFO 09-23 20:26:53] ax.utils.notebook.plotting: Injecting Plotly library into cell. Do not overwrite or delete cell.
[INFO 09-23 20:26:53] ax.utils.notebook.plotting: Please see (https://ax.dev/tutorials/visualizations.html#Fix-for-plots-that-are-not-rendering) if visualizations are not rendering.