diff --git a/tutorials/custom_botorch_model_in_ax.ipynb b/tutorials/custom_botorch_model_in_ax.ipynb index d2d68d7f39..0a31d621e0 100644 --- a/tutorials/custom_botorch_model_in_ax.ipynb +++ b/tutorials/custom_botorch_model_in_ax.ipynb @@ -91,7 +91,6 @@ "from typing import Optional\n", "\n", "from botorch.models.gpytorch import GPyTorchModel\n", - "from botorch.utils.datasets import SupervisedDataset\n", "from gpytorch.distributions import MultivariateNormal\n", "from gpytorch.kernels import RBFKernel, ScaleKernel\n", "from gpytorch.likelihoods import GaussianLikelihood\n", @@ -1140,6 +1139,15 @@ " trial_metadata = {\"name\": str(trial.index)}\n", " return trial_metadata\n", "\n", + " def poll_exception(self, trial) -> str:\n", + " \"\"\"\n", + " Returns the exception from a trial if present. In this case, we do not\n", + " expect that trials will have attached exceptions.\n", + " \"\"\"\n", + " raise NotImplementedError(\n", + " f\"{self.__class__.__name__} does not implement a `poll_exception` method.\"\n", + " )\n", + "\n", "\n", "exp = Experiment(\n", " name=\"branin_experiment\",\n",