Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions botorch/models/heterogeneous_mtgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def construct_inputs(
rank: int | None = None,
use_saas_prior: bool = True,
use_combinatorial_kernel: bool = True,
map_heterogeneous_to_full: bool = False,
) -> dict[str, Any]:
r"""Construct ``Model`` keyword arguments from a given ``MultiTaskDataset``.

Expand All @@ -341,6 +342,10 @@ def construct_inputs(
``MultiTaskConditionalKernel``.
use_combinatorial_kernel: Whether to use a combinatorial kernel over the
binary embedding of task features in ``MultiTaskConditionalKernel``.
map_heterogeneous_to_full: Accepted for compatibility with
``MultiTaskGP.construct_inputs`` but unused.
``HeterogeneousMTGP`` handles heterogeneous features via
``MultiTaskConditionalKernel``.
"""
if training_data.task_feature_index != -1:
raise NotImplementedError(
Expand Down
6 changes: 6 additions & 0 deletions test/models/test_heterogeneous_mtgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ def test_input_constructor(self) -> None:
self.assertEqual(model_inputs["full_feature_dim"], 5)
self.assertIsNone(model_inputs["rank"])

with self.subTest("map_heterogeneous_to_full accepted and ignored"):
model_inputs = HeterogeneousMTGP.construct_inputs(
training_data=self.mtds, map_heterogeneous_to_full=True
)
self.assertNotIn("map_heterogeneous_to_full", model_inputs)

def test_standard_heterogeneous_mtgp(self) -> None:
# Construct the model (inferred noise: train_Yvars is None).
model_inputs = HeterogeneousMTGP.construct_inputs(training_data=self.mtds)
Expand Down
Loading