For Multi-objective optimization (MOO) in the AxClient
, objectives are specified through the ObjectiveProperties
dataclass. An ObjectiveProperties
requires a boolean minimize
, and also accepts an optional floating point threshold
. If a threshold
is not specified, Ax will infer it through the use of heuristics. If the user knows the region of interest (because they have specs or prior knowledge), then specifying the thresholds is preferable to inferring it. But if the user would need to guess, inferring is preferable.
To learn more about how to choose a threshold, see Set Objective Thresholds to focus candidate generation in a region of interest. See the Service API Tutorial for more infomation on running experiments with the Service API.
import torch
from ax.plot.pareto_frontier import plot_pareto_frontier
from ax.plot.pareto_utils import compute_posterior_pareto_frontier
from ax.service.ax_client import AxClient
from ax.service.utils.instantiation import ObjectiveProperties
# Plotting imports and initialization
from ax.utils.notebook.plotting import init_notebook_plotting, render
from botorch.test_functions.multi_objective import BraninCurrin
init_notebook_plotting()
[INFO 03-01 16:53:53] ax.utils.notebook.plotting: Injecting Plotly library into cell. Do not overwrite or delete cell.
[INFO 03-01 16:53: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.
# Load our sample 2-objective problem
branin_currin = BraninCurrin(negate=True).to(
dtype=torch.double,
device=torch.device("cuda" if torch.cuda.is_available() else "cpu"),
)
ax_client = AxClient()
ax_client.create_experiment(
name="moo_experiment",
parameters=[
{
"name": f"x{i+1}",
"type": "range",
"bounds": [0.0, 1.0],
}
for i in range(2)
],
objectives={
# `threshold` arguments are optional
"a": ObjectiveProperties(minimize=False, threshold=branin_currin.ref_point[0]),
"b": ObjectiveProperties(minimize=False, threshold=branin_currin.ref_point[1]),
},
overwrite_existing_experiment=True,
is_test=True,
)
[INFO 03-01 16:53:53] ax.service.ax_client: Starting optimization with verbose logging. To disable logging, set the `verbose_logging` argument to `False`. Note that float values in the logs are rounded to 6 decimal points.
[INFO 03-01 16:53:53] ax.service.utils.instantiation: Inferred value type of ParameterType.FLOAT for parameter x1. If that is not the expected value type, you can explicitly specify 'value_type' ('int', 'float', 'bool' or 'str') in parameter dict.
[INFO 03-01 16:53:53] ax.service.utils.instantiation: Inferred value type of ParameterType.FLOAT for parameter x2. If that is not the expected value type, you can explicitly specify 'value_type' ('int', 'float', 'bool' or 'str') in parameter dict.
[INFO 03-01 16:53:53] ax.service.utils.instantiation: Created search space: SearchSpace(parameters=[RangeParameter(name='x1', parameter_type=FLOAT, range=[0.0, 1.0]), RangeParameter(name='x2', parameter_type=FLOAT, range=[0.0, 1.0])], parameter_constraints=[]).
[INFO 03-01 16:53:53] ax.core.experiment: The is_test flag has been set to True. This flag is meant purely for development and integration testing purposes. If you are running a live experiment, please set this flag to False
[INFO 03-01 16:53:53] ax.modelbridge.dispatch_utils: Using Models.BOTORCH_MODULAR since there is at least one ordered parameter and there are no unordered categorical parameters.
[INFO 03-01 16:53:53] ax.modelbridge.dispatch_utils: Calculating the number of remaining initialization trials based on num_initialization_trials=None max_initialization_trials=None num_tunable_parameters=2 num_trials=None use_batch_trials=False
[INFO 03-01 16:53:53] ax.modelbridge.dispatch_utils: calculated num_initialization_trials=5
[INFO 03-01 16:53:53] ax.modelbridge.dispatch_utils: num_completed_initialization_trials=0 num_remaining_initialization_trials=5
[INFO 03-01 16:53:53] ax.modelbridge.dispatch_utils: `verbose`, `disable_progbar`, and `jit_compile` are not yet supported when using `choose_generation_strategy` with ModularBoTorchModel, dropping these arguments.
[INFO 03-01 16:53:53] ax.modelbridge.dispatch_utils: Using Bayesian Optimization generation strategy: GenerationStrategy(name='Sobol+BoTorch', steps=[Sobol for 5 trials, BoTorch for subsequent trials]). Iterations after 5 will take longer to generate due to model-fitting.
In the case of MOO experiments, evaluation functions can be any arbitrary function that takes in a dict
of parameter names mapped to values and returns a dict
of objective names mapped to a tuple
of mean and SEM values.
def evaluate(parameters):
evaluation = branin_currin(
torch.tensor([parameters.get("x1"), parameters.get("x2")])
)
# In our case, standard error is 0, since we are computing a synthetic function.
# Set standard error to None if the noise level is unknown.
return {"a": (evaluation[0].item(), 0.0), "b": (evaluation[1].item(), 0.0)}
for i in range(25):
parameters, trial_index = ax_client.get_next_trial()
# Local evaluation here can be replaced with deployment to external system.
ax_client.complete_trial(trial_index=trial_index, raw_data=evaluate(parameters))
[INFO 03-01 16:53:54] ax.service.ax_client: Generated new trial 0 with parameters {'x1': 0.48288, 'x2': 0.275986} using model Sobol.
[INFO 03-01 16:53:54] ax.service.ax_client: Completed trial 0 with data: {'a': (-5.142522, 0.0), 'b': (-9.898978, 0.0)}.
[INFO 03-01 16:53:54] ax.service.ax_client: Generated new trial 1 with parameters {'x1': 0.134802, 'x2': 0.268957} using model Sobol.
[INFO 03-01 16:53:54] ax.service.ax_client: Completed trial 1 with data: {'a': (-62.162186, 0.0), 'b': (-10.800673, 0.0)}.
[INFO 03-01 16:53:54] ax.service.ax_client: Generated new trial 2 with parameters {'x1': 0.370686, 'x2': 0.8452} using model Sobol.
[INFO 03-01 16:53:54] ax.service.ax_client: Completed trial 2 with data: {'a': (-74.82235, 0.0), 'b': (-5.688198, 0.0)}.
[INFO 03-01 16:53:54] ax.service.ax_client: Generated new trial 3 with parameters {'x1': 0.969948, 'x2': 0.520872} using model Sobol.
[INFO 03-01 16:53:54] ax.service.ax_client: Completed trial 3 with data: {'a': (-27.836662, 0.0), 'b': (-6.297413, 0.0)}.
[INFO 03-01 16:53:54] ax.service.ax_client: Generated new trial 4 with parameters {'x1': 0.125801, 'x2': 0.859272} using model Sobol.
[INFO 03-01 16:53:54] ax.service.ax_client: Completed trial 4 with data: {'a': (-0.867915, 0.0), 'b': (-5.516521, 0.0)}.
[INFO 03-01 16:53:55] ax.service.ax_client: Generated new trial 5 with parameters {'x1': 0.039816, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:53:55] ax.service.ax_client: Completed trial 5 with data: {'a': (-7.335642, 0.0), 'b': (-2.7495, 0.0)}.
[INFO 03-01 16:53:55] ax.service.ax_client: Generated new trial 6 with parameters {'x1': 0.0, 'x2': 0.934472} using model BoTorch.
[INFO 03-01 16:53:55] ax.service.ax_client: Completed trial 6 with data: {'a': (-22.774462, 0.0), 'b': (-1.243101, 0.0)}.
[INFO 03-01 16:53:56] ax.service.ax_client: Generated new trial 7 with parameters {'x1': 0.080412, 'x2': 0.976766} using model BoTorch.
[INFO 03-01 16:53:56] ax.service.ax_client: Completed trial 7 with data: {'a': (-2.9375, 0.0), 'b': (-4.10206, 0.0)}.
[INFO 03-01 16:53:57] ax.service.ax_client: Generated new trial 8 with parameters {'x1': 0.791625, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:53:57] ax.service.ax_client: Completed trial 8 with data: {'a': (-209.408173, 0.0), 'b': (-4.124902, 0.0)}.
[INFO 03-01 16:53:58] ax.service.ax_client: Generated new trial 9 with parameters {'x1': 1.0, 'x2': 0.0} using model BoTorch.
[INFO 03-01 16:53:58] ax.service.ax_client: Completed trial 9 with data: {'a': (-10.960894, 0.0), 'b': (-10.179487, 0.0)}.
[INFO 03-01 16:53:59] ax.service.ax_client: Generated new trial 10 with parameters {'x1': 0.0, 'x2': 0.686808} using model BoTorch.
[INFO 03-01 16:53:59] ax.service.ax_client: Completed trial 10 with data: {'a': (-60.130199, 0.0), 'b': (-1.551386, 0.0)}.
[INFO 03-01 16:54:01] ax.service.ax_client: Generated new trial 11 with parameters {'x1': 0.014104, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:54:01] ax.service.ax_client: Completed trial 11 with data: {'a': (-13.235865, 0.0), 'b': (-1.754744, 0.0)}.
[INFO 03-01 16:54:03] ax.service.ax_client: Generated new trial 12 with parameters {'x1': 0.737699, 'x2': 0.1505} using model BoTorch.
[INFO 03-01 16:54:03] ax.service.ax_client: Completed trial 12 with data: {'a': (-20.71714, 0.0), 'b': (-10.239253, 0.0)}.
[INFO 03-01 16:54:04] ax.service.ax_client: Generated new trial 13 with parameters {'x1': 0.057301, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:54:04] ax.service.ax_client: Completed trial 13 with data: {'a': (-4.841271, 0.0), 'b': (-3.353148, 0.0)}.
[INFO 03-01 16:54:06] ax.service.ax_client: Generated new trial 14 with parameters {'x1': 0.105055, 'x2': 0.92249} using model BoTorch.
[INFO 03-01 16:54:06] ax.service.ax_client: Completed trial 14 with data: {'a': (-1.540693, 0.0), 'b': (-4.872642, 0.0)}.
[INFO 03-01 16:54:08] ax.service.ax_client: Generated new trial 15 with parameters {'x1': 0.026195, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:54:08] ax.service.ax_client: Completed trial 15 with data: {'a': (-10.144938, 0.0), 'b': (-2.234716, 0.0)}.
[INFO 03-01 16:54:10] ax.service.ax_client: Generated new trial 16 with parameters {'x1': 0.005983, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:54:10] ax.service.ax_client: Completed trial 16 with data: {'a': (-15.611118, 0.0), 'b': (-1.425004, 0.0)}.
[INFO 03-01 16:54:11] ax.service.ax_client: Generated new trial 17 with parameters {'x1': 1.0, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:54:11] ax.service.ax_client: Completed trial 17 with data: {'a': (-145.872208, 0.0), 'b': (-4.005316, 0.0)}.
[INFO 03-01 16:54:14] ax.service.ax_client: Generated new trial 18 with parameters {'x1': 0.047956, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:54:14] ax.service.ax_client: Completed trial 18 with data: {'a': (-6.014504, 0.0), 'b': (-3.039499, 0.0)}.
[INFO 03-01 16:54:17] ax.service.ax_client: Generated new trial 19 with parameters {'x1': 0.068038, 'x2': 0.994146} using model BoTorch.
[INFO 03-01 16:54:17] ax.service.ax_client: Completed trial 19 with data: {'a': (-3.859597, 0.0), 'b': (-3.702148, 0.0)}.
[INFO 03-01 16:54:20] ax.service.ax_client: Generated new trial 20 with parameters {'x1': 0.019997, 'x2': 1.0} using model BoTorch.
[INFO 03-01 16:54:20] ax.service.ax_client: Completed trial 20 with data: {'a': (-11.661202, 0.0), 'b': (-1.9908, 0.0)}.
[INFO 03-01 16:54:23] ax.service.ax_client: Generated new trial 21 with parameters {'x1': 0.126831, 'x2': 0.921181} using model BoTorch.
[INFO 03-01 16:54:23] ax.service.ax_client: Completed trial 21 with data: {'a': (-3.124254, 0.0), 'b': (-5.252728, 0.0)}.
[INFO 03-01 16:54:25] ax.service.ax_client: Generated new trial 22 with parameters {'x1': 0.649606, 'x2': 0.598178} using model BoTorch.
[INFO 03-01 16:54:25] ax.service.ax_client: Completed trial 22 with data: {'a': (-68.30246, 0.0), 'b': (-6.188535, 0.0)}.
[INFO 03-01 16:54:30] ax.service.ax_client: Generated new trial 23 with parameters {'x1': 0.08667, 'x2': 0.926483} using model BoTorch.
[INFO 03-01 16:54:30] ax.service.ax_client: Completed trial 23 with data: {'a': (-1.913823, 0.0), 'b': (-4.436513, 0.0)}.
[INFO 03-01 16:54:34] ax.service.ax_client: Generated new trial 24 with parameters {'x1': 0.106921, 'x2': 0.877944} using model BoTorch.
[INFO 03-01 16:54:34] ax.service.ax_client: Completed trial 24 with data: {'a': (-0.78245, 0.0), 'b': (-5.094986, 0.0)}.
objectives = ax_client.experiment.optimization_config.objective.objectives
frontier = compute_posterior_pareto_frontier(
experiment=ax_client.experiment,
data=ax_client.experiment.fetch_data(),
primary_objective=objectives[1].metric,
secondary_objective=objectives[0].metric,
absolute_metrics=["a", "b"],
num_points=20,
)
render(plot_pareto_frontier(frontier, CI_level=0.90))
In the rest of this tutorial, we will show two algorithms available in Ax for multi-objective optimization and visualize how they compare to eachother and to quasirandom search.
MOO covers the case where we care about multiple
outcomes in our experiment but we do not know before hand a specific weighting of those
objectives (covered by ScalarizedObjective
) or a specific constraint on one objective
(covered by OutcomeConstraint
s) that will produce the best result.
The solution in this case is to find a whole Pareto frontier, a surface in outcome-space containing points that can't be improved on in every outcome. This shows us the tradeoffs between objectives that we can choose to make.
Optimize a list of M objective functions $ \bigl(f^{(1)}( x),..., f^{(M)}( x) \bigr)$ over a bounded search space $\mathcal X \subset \mathbb R^d$.
We assume $f^{(i)}$ are expensive-to-evaluate black-box functions with no known analytical expression, and no observed gradients. For instance, a machine learning model where we're interested in maximizing accuracy and minimizing inference time, with $\mathcal X$ the set of possible configuration spaces
In a multi-objective optimization problem, there typically is no single best solution. Rather, the goal is to identify the set of Pareto optimal solutions such that any improvement in one objective means deteriorating another. Provided with the Pareto set, decision-makers can select an objective trade-off according to their preferences. In the plot below, the red dots are the Pareto optimal solutions (assuming both objectives are to be minimized).
Given a reference point $ r \in \mathbb R^M$, which we represent as a list of M ObjectiveThreshold
s, one for each coordinate, the hypervolume (HV) of a Pareto set $\mathcal P = \{ f(x_i)\}_{i=1}^{|\mathcal P|}$ is the volume of the space dominated (superior in every one of our M objectives) by $\mathcal P$ and bounded from above by a point $ r$. The reference point should be set to be slightly worse (10% is reasonable) than the worst value of each objective that a decision maker would tolerate. In the figure below, the grey area is the hypervolume in this 2-objective problem.
The below plots show three different sets of points generated by the qNEHVI [1] algorithm with different objective thresholds (aka reference points). Note that here we use absolute thresholds, but thresholds can also be relative to a status_quo arm.
The first plot shows the points without the ObjectiveThreshold
s visible (they're set far below the origin of the graph).
The second shows the points generated with (-18, -6) as thresholds. The regions violating the thresholds are greyed out. Only the white region in the upper right exceeds both threshold, points in this region dominate the intersection of these thresholds (this intersection is the reference point). Only points in this region contribute to the hypervolume objective. A few exploration points are not in the valid region, but almost all the rest of the points are.
The third shows points generated with a very strict pair of thresholds, (-18, -2). Only the white region in the upper right exceeds both thresholds. Many points do not lie in the dominating region, but there are still more focused there than in the second examples.
A deeper explanation of our the qNEHVI [1] and qNParEGO [2] algorithms this notebook explores can be found at
In addition, the underlying BoTorch implementation has a researcher-oriented tutorial at https://botorch.org/tutorials/multi_objective_bo.
import numpy as np
import pandas as pd
from ax.core.data import Data
from ax.core.experiment import Experiment
from ax.core.metric import Metric
from ax.core.objective import MultiObjective, Objective
from ax.core.optimization_config import (
MultiObjectiveOptimizationConfig,
ObjectiveThreshold,
)
from ax.core.parameter import ParameterType, RangeParameter
from ax.core.search_space import SearchSpace
from ax.metrics.noisy_function import NoisyFunctionMetric
# Factory methods for creating multi-objective optimization modesl.
from ax.modelbridge.factory import get_MOO_EHVI, get_MOO_PAREGO
# Analysis utilities, including a method to evaluate hypervolumes
from ax.modelbridge.modelbridge_utils import observed_hypervolume
from ax.modelbridge.registry import Models
from ax.runners.synthetic import SyntheticRunner
from ax.service.utils.report_utils import exp_to_df
x1 = RangeParameter(name="x1", lower=0, upper=1, parameter_type=ParameterType.FLOAT)
x2 = RangeParameter(name="x2", lower=0, upper=1, parameter_type=ParameterType.FLOAT)
search_space = SearchSpace(parameters=[x1, x2])
To optimize multiple objective we must create a MultiObjective
containing the metrics we'll optimize and MultiObjectiveOptimizationConfig
(which contains ObjectiveThreshold
s) instead of our more typical Objective
and OptimizationConfig
We define NoisyFunctionMetric
s to wrap our synthetic Branin-Currin problem's outputs. Add noise to see how robust our different optimization algorithms are.
class MetricA(NoisyFunctionMetric):
def f(self, x: np.ndarray) -> float:
return float(branin_currin(torch.tensor(x))[0])
class MetricB(NoisyFunctionMetric):
def f(self, x: np.ndarray) -> float:
return float(branin_currin(torch.tensor(x))[1])
metric_a = MetricA("a", ["x1", "x2"], noise_sd=0.0, lower_is_better=False)
metric_b = MetricB("b", ["x1", "x2"], noise_sd=0.0, lower_is_better=False)
mo = MultiObjective(
objectives=[Objective(metric=metric_a), Objective(metric=metric_b)],
)
objective_thresholds = [
ObjectiveThreshold(metric=metric, bound=val, relative=False)
for metric, val in zip(mo.metrics, branin_currin.ref_point)
]
optimization_config = MultiObjectiveOptimizationConfig(
objective=mo,
objective_thresholds=objective_thresholds,
)
These construct our experiment, then initialize with Sobol points before we fit a Gaussian Process model to those initial points.
# Reasonable defaults for number of quasi-random initialization points and for subsequent model-generated trials.
N_INIT = 6
N_BATCH = 25
def build_experiment():
experiment = Experiment(
name="pareto_experiment",
search_space=search_space,
optimization_config=optimization_config,
runner=SyntheticRunner(),
)
return experiment
## Initialize with Sobol samples
def initialize_experiment(experiment):
sobol = Models.SOBOL(search_space=experiment.search_space, seed=1234)
for _ in range(N_INIT):
experiment.new_trial(sobol.gen(1)).run()
return experiment.fetch_data()
We use quasirandom points as a fast baseline for evaluating the quality of our multi-objective optimization algorithms.
sobol_experiment = build_experiment()
sobol_data = initialize_experiment(sobol_experiment)
sobol_model = Models.SOBOL(
experiment=sobol_experiment,
data=sobol_data,
)
sobol_hv_list = []
for i in range(N_BATCH):
generator_run = sobol_model.gen(1)
trial = sobol_experiment.new_trial(generator_run=generator_run)
trial.run()
exp_df = exp_to_df(sobol_experiment)
outcomes = np.array(exp_df[["a", "b"]], dtype=np.double)
# Fit a GP-based model in order to calculate hypervolume.
# We will not use this model to generate new points.
dummy_model = Models.BOTORCH_MODULAR(
experiment=sobol_experiment,
data=sobol_experiment.fetch_data(),
)
try:
hv = observed_hypervolume(modelbridge=dummy_model)
except:
hv = 0
print("Failed to compute hv")
sobol_hv_list.append(hv)
print(f"Iteration: {i}, HV: {hv}")
sobol_outcomes = np.array(exp_to_df(sobol_experiment)[["a", "b"]], dtype=np.double)
/tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:49] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:49] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:49] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 0, HV: 0.0 Iteration: 1, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:50] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:50] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 2, HV: 25.441723108716136 Iteration: 3, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:50] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:50] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 4, HV: 25.441723108716136 Iteration: 5, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
[WARNING 03-01 16:54:50] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 6, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:51] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 7, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:51] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 8, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:51] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 9, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:51] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 10, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:51] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 11, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:52] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 12, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:52] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 13, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:53] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 14, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:53] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 15, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:53] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 16, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:53] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 17, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:54] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 18, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:54] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 19, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:55] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 20, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:55] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 21, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:55] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 22, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /tmp/tmp.KbiES6I0qN/Ax-main/ax/core/data.py:284: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. [WARNING 03-01 16:54:56] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 23, HV: 25.441723108716136
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. [WARNING 03-01 16:54:56] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 24, HV: 25.441723108716136
Noisy Expected Hypervolume Improvement. This is our current recommended algorithm for multi-objective optimization.
ehvi_experiment = build_experiment()
ehvi_data = initialize_experiment(ehvi_experiment)
ehvi_hv_list = []
ehvi_model = None
for i in range(N_BATCH):
ehvi_model = Models.BOTORCH_MODULAR(
experiment=ehvi_experiment,
data=ehvi_data,
)
generator_run = ehvi_model.gen(1)
trial = ehvi_experiment.new_trial(generator_run=generator_run)
trial.run()
ehvi_data = Data.from_multiple_data([ehvi_data, trial.fetch_data()])
exp_df = exp_to_df(ehvi_experiment)
outcomes = np.array(exp_df[["a", "b"]], dtype=np.double)
try:
hv = observed_hypervolume(modelbridge=ehvi_model)
except:
hv = 0
print("Failed to compute hv")
ehvi_hv_list.append(hv)
print(f"Iteration: {i}, HV: {hv}")
ehvi_outcomes = np.array(exp_to_df(ehvi_experiment)[["a", "b"]], dtype=np.double)
[WARNING 03-01 16:54:57] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 0, HV: 0.0
[WARNING 03-01 16:54:58] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 1, HV: 0.0
[WARNING 03-01 16:54:58] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 2, HV: 0.0
[WARNING 03-01 16:55:00] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 3, HV: 2.369795709893773
[WARNING 03-01 16:55:01] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 4, HV: 22.010682327459705
[WARNING 03-01 16:55:02] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 5, HV: 26.47674692050373
[WARNING 03-01 16:55:04] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 6, HV: 40.0284150821064
[WARNING 03-01 16:55:05] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 7, HV: 40.0284150821064
[WARNING 03-01 16:55:08] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 8, HV: 44.90084426932664
[WARNING 03-01 16:55:10] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 9, HV: 48.7412077484797
[WARNING 03-01 16:55:12] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 10, HV: 50.51715592797953
[WARNING 03-01 16:55:15] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 11, HV: 52.005364598402736
[WARNING 03-01 16:55:18] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 12, HV: 53.443214800135635
[WARNING 03-01 16:55:21] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 13, HV: 54.33762633261002
[WARNING 03-01 16:55:25] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 14, HV: 54.890660145509386
[WARNING 03-01 16:55:29] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 15, HV: 55.10335504189524
[WARNING 03-01 16:55:32] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 16, HV: 55.466301981160385
[WARNING 03-01 16:55:35] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 17, HV: 55.82585017990937
[WARNING 03-01 16:55:39] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 18, HV: 56.16799484703484
[WARNING 03-01 16:55:43] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 19, HV: 56.38200483694044
[WARNING 03-01 16:55:49] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 20, HV: 56.59932941005714
[WARNING 03-01 16:55:53] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 21, HV: 56.73269411893431
[WARNING 03-01 16:55:57] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 22, HV: 57.074647705878625
[WARNING 03-01 16:56:02] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 23, HV: 57.19953831481554
[WARNING 03-01 16:56:07] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. [WARNING 03-01 16:56:07] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 24, HV: 57.247012245514576
The plotted points are samples from the fitted model's posterior, not observed samples.
frontier = compute_posterior_pareto_frontier(
experiment=ehvi_experiment,
data=ehvi_experiment.fetch_data(),
primary_objective=metric_b,
secondary_objective=metric_a,
absolute_metrics=["a", "b"],
num_points=20,
)
render(plot_pareto_frontier(frontier, CI_level=0.90))
This is a good alternative algorithm for multi-objective optimization when qNEHVI runs too slowly.
parego_experiment = build_experiment()
parego_data = initialize_experiment(parego_experiment)
parego_hv_list = []
parego_model = None
for i in range(N_BATCH):
parego_model = get_MOO_PAREGO(
experiment=parego_experiment,
data=parego_data,
)
generator_run = parego_model.gen(1)
trial = parego_experiment.new_trial(generator_run=generator_run)
trial.run()
parego_data = Data.from_multiple_data([parego_data, trial.fetch_data()])
exp_df = exp_to_df(parego_experiment)
outcomes = np.array(exp_df[["a", "b"]], dtype=np.double)
try:
hv = observed_hypervolume(modelbridge=parego_model)
except:
hv = 0
print("Failed to compute hv")
parego_hv_list.append(hv)
print(f"Iteration: {i}, HV: {hv}")
parego_outcomes = np.array(exp_to_df(parego_experiment)[["a", "b"]], dtype=np.double)
[WARNING 03-01 16:56:26] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 0, HV: 0.0
[WARNING 03-01 16:56:27] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 1, HV: 0.0
[WARNING 03-01 16:56:28] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 2, HV: 0.0
[WARNING 03-01 16:56:29] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 3, HV: 17.414521022736864
[WARNING 03-01 16:56:30] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 4, HV: 17.414521022736864
[WARNING 03-01 16:56:32] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 5, HV: 22.348267912054325
[WARNING 03-01 16:56:33] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 6, HV: 36.25470465603345
[WARNING 03-01 16:56:33] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 7, HV: 40.07187598338156
[WARNING 03-01 16:56:34] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 8, HV: 40.07187598338156
[WARNING 03-01 16:56:35] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 9, HV: 41.81608147086572
[WARNING 03-01 16:56:38] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 10, HV: 44.119557620611886
[WARNING 03-01 16:56:39] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 11, HV: 44.38667165294802
[WARNING 03-01 16:56:40] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 12, HV: 44.47552928751428
[WARNING 03-01 16:56:40] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 13, HV: 44.47552928751428
[WARNING 03-01 16:56:42] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 14, HV: 44.57164401858531
[WARNING 03-01 16:56:45] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 15, HV: 44.595754101713936
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/botorch/optim/optimize.py:367: RuntimeWarning: Optimization failed in `gen_candidates_scipy` with the following warning(s): [OptimizationWarning('Optimization failed within `scipy.optimize.minimize` with status 4 and message Inequality constraints incompatible.')] Trying again with a new set of initial conditions.
[WARNING 03-01 16:56:49] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 16, HV: 44.59721298461487
[WARNING 03-01 16:56:51] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 17, HV: 44.60045872209761
[WARNING 03-01 16:56:52] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 18, HV: 45.000213040315465
[WARNING 03-01 16:56:54] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 19, HV: 45.63120694555407
[WARNING 03-01 16:56:56] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 20, HV: 45.63933921328504
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/linear_operator/utils/cholesky.py:40: NumericalWarning: A not p.d., added jitter of 1.0e-08 to the diagonal [WARNING 03-01 16:56:59] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/linear_operator/utils/cholesky.py:40: NumericalWarning: A not p.d., added jitter of 1.0e-08 to the diagonal
Iteration: 21, HV: 45.710975762681066
[WARNING 03-01 16:57:00] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action.
Iteration: 22, HV: 45.71114137802303
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/linear_operator/utils/cholesky.py:40: NumericalWarning: A not p.d., added jitter of 1.0e-08 to the diagonal [WARNING 03-01 16:57:03] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/linear_operator/utils/cholesky.py:40: NumericalWarning: A not p.d., added jitter of 1.0e-08 to the diagonal
Iteration: 23, HV: 45.724673882353855
[WARNING 03-01 16:57:04] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
/tmp/tmp.KbiES6I0qN/Ax-main/ax/modelbridge/modelbridge_utils.py:1030: UserWarning: FYI: The default behavior of `get_pareto_frontier_and_configs` when `transform_outcomes_and_configs` is not specified has changed. Previously, the default was `transform_outcomes_and_configs=True`; now this argument is deprecated and behavior is as if `transform_outcomes_and_configs=False`. You did not specify `transform_outcomes_and_configs`, so this warning requires no action. [WARNING 03-01 16:57:04] ax.service.utils.report_utils: Column reason missing for all trials. Not appending column.
Iteration: 24, HV: 45.72471633172521
The plotted points are samples from the fitted model's posterior, not observed samples.
frontier = compute_posterior_pareto_frontier(
experiment=parego_experiment,
data=parego_experiment.fetch_data(),
primary_objective=metric_b,
secondary_objective=metric_a,
absolute_metrics=["a", "b"],
num_points=20,
)
render(plot_pareto_frontier(frontier, CI_level=0.90))
To examine optimization process from another perspective, we plot the collected observations under each algorithm where the color corresponds to the BO iteration at which the point was collected. The plot on the right for $q$NEHVI shows that the $q$NEHVI quickly identifies the Pareto frontier and most of its evaluations are very close to the Pareto frontier. $q$NParEGO also identifies has many observations close to the Pareto frontier, but relies on optimizing random scalarizations, which is a less principled way of optimizing the Pareto front compared to $q$NEHVI, which explicitly attempts focuses on improving the Pareto front. Sobol generates random points and has few points close to the Pareto front.
import matplotlib
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.cm import ScalarMappable
%matplotlib inline
fig, axes = plt.subplots(1, 3, figsize=(20, 6))
algos = ["Sobol", "qNParEGO", "qNEHVI"]
outcomes_list = [sobol_outcomes, parego_outcomes, ehvi_outcomes]
cm = matplotlib.colormaps["viridis"]
BATCH_SIZE = 1
n_results = N_BATCH * BATCH_SIZE + N_INIT
batch_number = torch.cat(
[
torch.zeros(N_INIT),
torch.arange(1, N_BATCH + 1).repeat(BATCH_SIZE, 1).t().reshape(-1),
]
).numpy()
for i, train_obj in enumerate(outcomes_list):
x = i
sc = axes[x].scatter(
train_obj[:n_results, 0],
train_obj[:n_results, 1],
c=batch_number[:n_results],
alpha=0.8,
)
axes[x].set_title(algos[i])
axes[x].set_xlabel("Objective 1")
axes[x].set_xlim(-150, 5)
axes[x].set_ylim(-15, 0)
axes[0].set_ylabel("Objective 2")
norm = plt.Normalize(batch_number.min(), batch_number.max())
sm = ScalarMappable(norm=norm, cmap=cm)
sm.set_array([])
fig.subplots_adjust(right=0.9)
cbar_ax = fig.add_axes([0.93, 0.15, 0.01, 0.7])
cbar = fig.colorbar(sm, cax=cbar_ax)
cbar.ax.set_title("Iteration")
Text(0.5, 1.0, 'Iteration')
The hypervolume of the space dominated by points that dominate the reference point.
The plot below shows a common metric of multi-objective optimization performance when the true Pareto frontier is known: the log difference between the hypervolume of the true Pareto front and the hypervolume of the approximate Pareto front identified by each algorithm. The log hypervolume difference is plotted at each step of the optimization for each of the algorithms.
The plot show that $q$NEHVI vastly outperforms $q$NParEGO which outperforms the Sobol baseline.
iters = np.arange(1, N_BATCH + 1)
log_hv_difference_sobol = np.log10(branin_currin.max_hv - np.asarray(sobol_hv_list))[
: N_BATCH + 1
]
log_hv_difference_parego = np.log10(branin_currin.max_hv - np.asarray(parego_hv_list))[
: N_BATCH + 1
]
log_hv_difference_ehvi = np.log10(branin_currin.max_hv - np.asarray(ehvi_hv_list))[
: N_BATCH + 1
]
fig, ax = plt.subplots(1, 1, figsize=(8, 6))
ax.plot(iters, log_hv_difference_sobol, label="Sobol", linewidth=1.5)
ax.plot(iters, log_hv_difference_parego, label="qNParEGO", linewidth=1.5)
ax.plot(iters, log_hv_difference_ehvi, label="qNEHVI", linewidth=1.5)
ax.set(
xlabel="number of observations (beyond initial points)",
ylabel="Log Hypervolume Difference",
)
ax.legend(loc="lower right")
<matplotlib.legend.Legend at 0x7f3c834a2dc0>
Total runtime of script: 3 minutes, 36.3 seconds.