Skip to content

Commit

Permalink
Don't let MBM pass raw_samples to optimize_acqf_discrete
Browse files Browse the repository at this point in the history
Summary: pytorch/botorch#2390 broke workflows that were passing this argument, which used to be silently ignored. This is a hotfix that will stop those usages from failing.

Differential Revision: D59161641
  • Loading branch information
esantorella authored and facebook-github-bot committed Jun 28, 2024
1 parent ff1445a commit 4f27366
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ax/models/torch/botorch_modular/acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,11 @@ def optimize(
)
n = num_choices

# `raw_samples` is not supported by `optimize_acqf_discrete`.
# TODO[santorella]: Rather than manually removing it, we should
# ensure that it is never passed.
if optimizer_options is not None:
optimizer_options.pop("raw_samples")
discrete_opt_options = optimizer_argparse(
self.acqf,
bounds=bounds,
Expand Down

0 comments on commit 4f27366

Please sign in to comment.