From 21c0ba0d8d9b90d514423b1017d72fd0f63966f7 Mon Sep 17 00:00:00 2001 From: Sait Cakmak Date: Wed, 6 Nov 2024 09:21:47 -0800 Subject: [PATCH] Remove HeterogeneousSingleTaskGP Summary: X-link: https://github.com/pytorch/botorch/pull/2616 This model has been buggy for quite a long time and we still haven't fixed it. Removing it should be preferable to keeping around a known buggy model. Example bug reports: - https://github.com/pytorch/botorch/issues/861 - https://github.com/pytorch/botorch/issues/933 - https://github.com/pytorch/botorch/issues/2551 Differential Revision: D65543676 --- ax/models/tests/test_torch_model_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ax/models/tests/test_torch_model_utils.py b/ax/models/tests/test_torch_model_utils.py index 102cf25cfb3..2241cb24441 100644 --- a/ax/models/tests/test_torch_model_utils.py +++ b/ax/models/tests/test_torch_model_utils.py @@ -17,7 +17,7 @@ tensor_callable_to_array_callable, ) from ax.utils.common.testutils import TestCase -from botorch.models import HeteroskedasticSingleTaskGP, SingleTaskGP +from botorch.models import SingleTaskGP from botorch.models.deterministic import GenericDeterministicModel from botorch.models.model import ModelList from botorch.models.model_list_gp_regression import ModelListGP @@ -31,9 +31,9 @@ def test_is_noiseless(self) -> None: x = torch.zeros(1, 1) y = torch.zeros(1, 1) se = torch.zeros(1, 1) - model = SingleTaskGP(x, y) + model = SingleTaskGP(train_X=x, train_Y=y) self.assertTrue(is_noiseless(model)) - model = HeteroskedasticSingleTaskGP(x, y, se) + model = SingleTaskGP(train_X=x, train_Y=y, train_Yvar=se) self.assertFalse(is_noiseless(model)) with self.assertRaises(ModelError): is_noiseless(ModelListGP()) @@ -181,7 +181,7 @@ def test_with_obj_thresholds_can_subset(self) -> None: def test_unsupported(self) -> None: yvar = torch.ones(1, 2) - model = HeteroskedasticSingleTaskGP(self.x, self.y, yvar) + model = SingleTaskGP(train_X=self.x, train_Y=self.y, train_Yvar=yvar) subset_model_results = subset_model(model, self.obj_weights) model_sub = subset_model_results.model obj_weights_sub = subset_model_results.objective_weights