Skip to content

Commit

Permalink
Account for botorch removal of deprecated models
Browse files Browse the repository at this point in the history
Summary: Account for removal of `FixedNoiseGP` and `FixedNoiseMultiFidelityGP` models in botorch, as well as the removal of the `data_fidelity` argument of `SingleTaskMultiFidelityGP`.

Reviewed By: saitcakmak

Differential Revision: D62687970
  • Loading branch information
Balandat authored and facebook-github-bot committed Sep 14, 2024
1 parent 2fc80f1 commit ffb97dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ax/models/torch/botorch_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ def _get_model(
gp = SingleTaskMultiFidelityGP(
train_X=X,
train_Y=Y,
data_fidelity=fidelity_features[0],
data_fidelities=fidelity_features[:1],
input_transform=warp_tf,
**kwargs,
)
Expand Down
8 changes: 2 additions & 6 deletions ax/storage/botorch_modular_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@
from botorch.models.fully_bayesian_multitask import SaasFullyBayesianMultiTaskGP

# BoTorch `Model` imports
from botorch.models.gp_regression import FixedNoiseGP, SingleTaskGP
from botorch.models.gp_regression_fidelity import (
FixedNoiseMultiFidelityGP,
SingleTaskMultiFidelityGP,
)
from botorch.models.gp_regression import SingleTaskGP
from botorch.models.gp_regression_fidelity import SingleTaskMultiFidelityGP
from botorch.models.gp_regression_mixed import MixedSingleTaskGP
from botorch.models.model import Model
from botorch.models.model_list_gp_regression import ModelListGP
Expand Down Expand Up @@ -111,7 +108,6 @@
# supported parent classes, so that we can reap them with minimal
# concern for backwards compatibility when the time comes.
FixedNoiseGP: "SingleTaskGP",
FixedNoiseMultiFidelityGP: "SingleTaskMultiFidelityGP",
MixedSingleTaskGP: "MixedSingleTaskGP",
ModelListGP: "ModelListGP",
MultiTaskGP: "MultiTaskGP",
Expand Down
4 changes: 2 additions & 2 deletions tutorials/sebo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"from ax.service.ax_client import AxClient, ObjectiveProperties\n",
"from ax.utils.common.typeutils import checked_cast\n",
"from botorch.acquisition.multi_objective import qNoisyExpectedHypervolumeImprovement\n",
"from botorch.models import FixedNoiseGP, SaasFullyBayesianSingleTaskGP, SingleTaskGP"
"from botorch.models import SaasFullyBayesianSingleTaskGP, SingleTaskGP"
]
},
{
Expand Down Expand Up @@ -247,7 +247,7 @@
"if SMOKE_TEST:\n",
" N_BATCHES = 1\n",
" BATCH_SIZE = 1\n",
" SURROGATE_CLASS = None # Auto-pick SingleTaskGP / FixedNoiseGP\n",
" SURROGATE_CLASS = None # Auto-pick SingleTaskGP\n",
"else:\n",
" N_BATCHES = 4\n",
" BATCH_SIZE = 5\n",
Expand Down

0 comments on commit ffb97dc

Please sign in to comment.