From aa2bb653bf977811e85d302ea0138561b22e8d99 Mon Sep 17 00:00:00 2001 From: Sait Cakmak Date: Wed, 5 Feb 2025 18:14:51 -0500 Subject: [PATCH] Update custom_botorch_model_in_ax.ipynb --- .../custom_botorch_model_in_ax.ipynb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tutorials/custom_botorch_model_in_ax/custom_botorch_model_in_ax.ipynb b/tutorials/custom_botorch_model_in_ax/custom_botorch_model_in_ax.ipynb index 98d5b8c2a4..7967796d08 100644 --- a/tutorials/custom_botorch_model_in_ax/custom_botorch_model_in_ax.ipynb +++ b/tutorials/custom_botorch_model_in_ax/custom_botorch_model_in_ax.ipynb @@ -157,11 +157,10 @@ "showInput": false }, "source": [ - "### Instantiate a `BoTorchModel` in Ax\n", + "### Instantiate a `BoTorchGenerator` in Ax\n", "\n", - "A `BoTorchModel` in Ax encapsulates both the surrogate -- which `Ax` calls a `Surrogate` and BoTorch calls a `Model` -- and an acquisition function. Here, we will only specify the custom surrogate and let Ax choose the default acquisition function.\n", + "A `BoTorchGenerator` in Ax encapsulates both the surrogate -- which `Ax` calls a `Surrogate` and BoTorch calls a `Model` -- and an acquisition function. Here, we will only specify the custom surrogate and let Ax choose the default acquisition function.\n", "\n", - "Most models should work with the base `Surrogate` in Ax, except for BoTorch `ModelListGP`, which works with `ListSurrogate`.\n", "Note that the `Model` (e.g., the `SimpleCustomGP`) must implement `construct_inputs`, as this is used to construct the inputs required for instantiating a `Model` instance from the experiment data." ] }, @@ -188,11 +187,11 @@ }, "outputs": [], "source": [ - "from ax.models.torch.botorch_modular.model import BoTorchModel\n", + "from ax.models.torch.botorch_modular.model import BoTorchGenerator\n", "from ax.models.torch.botorch_modular.surrogate import Surrogate, SurrogateSpec\n", "from ax.models.torch.botorch_modular.utils import ModelConfig\n", "\n", - "ax_model = BoTorchModel(\n", + "ax_model = BoTorchGenerator(\n", " surrogate=Surrogate(\n", " surrogate_spec=SurrogateSpec(\n", " model_configs=[\n", @@ -230,7 +229,7 @@ "source": [ "### Combine with a `ModelBridge`\n", "\n", - "`Model`s in Ax require a `ModelBridge` to interface with `Experiment`s. A `ModelBridge` takes the inputs supplied by the `Experiment` and converts them to the inputs expected by the `Model`. For a `BoTorchModel`, we use `TorchModelBridge`. The Modular BoTorch interface creates the `BoTorchModel` and the `TorchModelBridge` in a single step, as follows:\n", + "`Model`s in Ax require a `ModelBridge` to interface with `Experiment`s. A `ModelBridge` takes the inputs supplied by the `Experiment` and converts them to the inputs expected by the `Model`. For a `BoTorchGenerator`, we use `TorchModelBridge`. The Modular BoTorch interface creates the `BoTorchGenerator` and the `TorchModelBridge` in a single step, as follows:\n", "\n", "```\n", "from ax.modelbridge.registry import Generators\n",