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.

More details: Combinerator integ tests failing with:

```
TypeError: optimize_acqf_discrete() got an unexpected keyword argument 'raw_samples'
```

e.g., https://fburl.com/logarithm/kyr18i16 (scuba query: https://fburl.com/scuba/fblearner_workflow_run_status/hid8tp94).

Reviewed By: dme65

Differential Revision: D59161641

fbshipit-source-id: 16aae81c03016e68ed866e29c61e3ffb1d317b95
  • Loading branch information
esantorella authored and facebook-github-bot committed Jul 1, 2024
1 parent ff1445a commit 8bb4bcf
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 8bb4bcf

Please sign in to comment.