When an optimization query combines a continuous location with a discrete choice—such as selecting a fidelity level—ordinary optimize_acqf is insufficient. BoTorch's optimize_acqf_mixed searches this mixed space for the candidate with the highest acquisition score. section 9.3.2 section 9.7
The continuous variables remain bounded normally, while fixed_features_list enumerates allowed values for each discrete column. Include bounds for the discrete dimensions in bounds as well. section 9.3.2
Selecting a multifidelity query
A multifidelity MES policy can optimize one continuous location and two possible fidelity values as follows:\n\nfrom botorch.optim.optimize import optimize_acqf_mixed\n\nnext_x, acq_val = optimize_acqf_mixed(\n policy,\n bounds=torch.cat([bounds, torch.tensor([0.5, 1.0]).unsqueeze(-1)], dim=1),\n fixed_features_list=[{1: cost.item()} for cost in fidelities],\n q=1,\n num_restarts=20,\n raw_samples=50,\n)\n\nThe resulting candidate can favor a low-fidelity query when its acquisition score reflects greater information per unit cost. section 9.3.2
