diff --git a/botorch/optim/optimize.py b/botorch/optim/optimize.py index 8305fde284..02223a01fc 100644 --- a/botorch/optim/optimize.py +++ b/botorch/optim/optimize.py @@ -108,14 +108,6 @@ def __post_init__(self) -> None: "3-dimensional. Its shape is " f"{batch_initial_conditions_shape}." ) - # make dim 2 inputs into dim 3 inputs in order to be consistent downstream. - if len(batch_initial_conditions_shape) == 2: - # Use object.__setattr__ to bypass immutability and set a value - object.__setattr__( - self, - "batch_initial_conditions", - self.batch_initial_conditions.unsqueeze(0), - ) if batch_initial_conditions_shape[-1] != d: raise ValueError( diff --git a/botorch/optim/optimize_mixed.py b/botorch/optim/optimize_mixed.py index ac153b9e23..f7e3424299 100644 --- a/botorch/optim/optimize_mixed.py +++ b/botorch/optim/optimize_mixed.py @@ -496,6 +496,7 @@ def continuous_step( updated_opt_inputs = dataclasses.replace( opt_inputs, q=1, + raw_samples=None, num_restarts=1, batch_initial_conditions=current_x.unsqueeze(0), fixed_features={