Skip to content

Commit 537fc68

Browse files
committed
fix: fix the homotopy logic
1 parent 4b1fe5b commit 537fc68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

botorch/optim/optimize_homotopy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ def optimize_acqf_homotopy(
157157
"""
158158
shared_optimize_acqf_kwargs = {
159159
"num_restarts": num_restarts,
160-
"raw_samples": raw_samples,
161160
"inequality_constraints": inequality_constraints,
162161
"equality_constraints": equality_constraints,
163162
"nonlinear_inequality_constraints": nonlinear_inequality_constraints,
@@ -181,11 +180,14 @@ def optimize_acqf_homotopy(
181180
homotopy.restart()
182181

183182
while not homotopy.should_stop:
183+
# After the first iteration we don't want to generate new raw samples
184+
requested_raw_samples = raw_samples if candidates is None else None
184185
candidates, acq_values = optimize_acqf(
185186
acq_function=acq_function,
186187
bounds=bounds,
187188
q=1,
188189
options=options,
190+
raw_samples=requested_raw_samples,
189191
batch_initial_conditions=candidates,
190192
**shared_optimize_acqf_kwargs,
191193
)
@@ -204,6 +206,7 @@ def optimize_acqf_homotopy(
204206
bounds=bounds,
205207
q=1,
206208
options=final_options,
209+
raw_samples=None,
207210
batch_initial_conditions=candidates,
208211
**shared_optimize_acqf_kwargs,
209212
)

0 commit comments

Comments
 (0)