qMultiFidelityLowerBoundMaxValueEntropy seems to break with fantasization. The error seems specific to GIBBON as using qMultiFidelityMaxValueEntropy instead is fine.
To reproduce
I defined a SingleTaskMultiFidelityGP model for a toy multi-fidelity task:
import torch
from botorch.acquisition.max_value_entropy_search import (
qMultiFidelityLowerBoundMaxValueEntropy,
qMultiFidelityMaxValueEntropy,
)
from botorch.fit import fit_gpytorch_mll
from botorch.models import SingleTaskMultiFidelityGP
from botorch.optim import optimize_acqf_mixed
from gpytorch.mlls import ExactMarginalLogLikelihood
from botorch.acquisition.utils import project_to_target_fidelity
train_X = torch.rand((10, 3), dtype=torch.double)
train_Y = torch.rand((10, 1), dtype=torch.double)
model = SingleTaskMultiFidelityGP(train_X, train_Y, data_fidelity=-1)
bounds = torch.tensor([[0.0] * 3, [1.0] * 3], dtype=torch.double)
When we evaluate its multi-fidelity GIBBON without fantasization, everything is working fine:
Traceback (most recent call last):
File "test.py", line 21, in <module>
mf_gibbon = MF_qGIBBON(train_X[:1])
File "lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "lib/python3.10/site-packages/botorch/utils/transforms.py", line 277, in decorated
output = method(acqf, X, *args, **kwargs)
File "lib/python3.10/site-packages/botorch/acquisition/max_value_entropy_search.py", line 809, in forward
ig = self._compute_information_gain(
File "lib/python3.10/site-packages/botorch/acquisition/max_value_entropy_search.py", line 861, in _compute_information_gain
return qLowerBoundMaxValueEntropy._compute_information_gain(
File "lib/python3.10/site-packages/botorch/acquisition/max_value_entropy_search.py", line 586, in _compute_information_gain
normalized_mvs = (mvs - mean_m) / stdv
RuntimeError: The size of tensor a (10) must match the size of tensor b (16) at non-singleton dimension 1
🐛 Bug
qMultiFidelityLowerBoundMaxValueEntropy
seems to break with fantasization. The error seems specific to GIBBON as usingqMultiFidelityMaxValueEntropy
instead is fine.To reproduce
I defined a
SingleTaskMultiFidelityGP
model for a toy multi-fidelity task:When we evaluate its multi-fidelity GIBBON without fantasization, everything is working fine:
But when we fantasize it by setting
X_pending
, evaluation throws an error:Stack trace/error message
Expected Behavior
Evaluation runs through correctly.
System information