@@ -157,7 +157,6 @@ def optimize_acqf_homotopy(
157
157
"""
158
158
shared_optimize_acqf_kwargs = {
159
159
"num_restarts" : num_restarts ,
160
- "raw_samples" : raw_samples ,
161
160
"inequality_constraints" : inequality_constraints ,
162
161
"equality_constraints" : equality_constraints ,
163
162
"nonlinear_inequality_constraints" : nonlinear_inequality_constraints ,
@@ -181,11 +180,14 @@ def optimize_acqf_homotopy(
181
180
homotopy .restart ()
182
181
183
182
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
184
185
candidates , acq_values = optimize_acqf (
185
186
acq_function = acq_function ,
186
187
bounds = bounds ,
187
188
q = 1 ,
188
189
options = options ,
190
+ raw_samples = requested_raw_samples ,
189
191
batch_initial_conditions = candidates ,
190
192
** shared_optimize_acqf_kwargs ,
191
193
)
@@ -204,6 +206,7 @@ def optimize_acqf_homotopy(
204
206
bounds = bounds ,
205
207
q = 1 ,
206
208
options = final_options ,
209
+ raw_samples = None ,
207
210
batch_initial_conditions = candidates ,
208
211
** shared_optimize_acqf_kwargs ,
209
212
)
0 commit comments