Skip to content

Commit b5b7fe5

Browse files
committed
fix: mixed optimization tests break when using dim 3 batch initial conditions
1 parent 537fc68 commit b5b7fe5

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

botorch/optim/optimize.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,6 @@ def __post_init__(self) -> None:
108108
"3-dimensional. Its shape is "
109109
f"{batch_initial_conditions_shape}."
110110
)
111-
# make dim 2 inputs into dim 3 inputs in order to be consistent downstream.
112-
if len(batch_initial_conditions_shape) == 2:
113-
# Use object.__setattr__ to bypass immutability and set a value
114-
object.__setattr__(
115-
self,
116-
"batch_initial_conditions",
117-
self.batch_initial_conditions.unsqueeze(0),
118-
)
119111

120112
if batch_initial_conditions_shape[-1] != d:
121113
raise ValueError(

botorch/optim/optimize_mixed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ def continuous_step(
496496
updated_opt_inputs = dataclasses.replace(
497497
opt_inputs,
498498
q=1,
499+
raw_samples=None,
499500
num_restarts=1,
500501
batch_initial_conditions=current_x.unsqueeze(0),
501502
fixed_features={

0 commit comments

Comments
 (0)