Skip to content

Commit

Permalink
Avoid use of is_mc due to yet unclear semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSosic committed Jan 23, 2025
1 parent 23445ab commit 1505cd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baybe/acquisition/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ def to_botorch(
additional_params["best_f"] = (
bo_surrogate.posterior(train_x).mean.min().item()
)
if self.is_mc:
if issubclass(acqf_cls, bo_acqf.MCAcquisitionFunction):
additional_params["best_f"] *= -1.0

if issubclass(acqf_cls, bo_acqf.AnalyticAcquisitionFunction):
additional_params["maximize"] = False
elif issubclass(acqf_cls, bo_acqf.qNegIntegratedPosteriorVariance):
# qNIPV is valid but does not require any adjusted params
pass
elif self.is_mc:
elif issubclass(acqf_cls, bo_acqf.MCAcquisitionFunction):
additional_params["objective"] = LinearMCObjective(
torch.tensor([-1.0])
)
Expand Down

0 comments on commit 1505cd6

Please sign in to comment.