Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
CristianLara committed Dec 16, 2024
2 parents 846b3b4 + ef7098a commit 8ccbf33
Show file tree
Hide file tree
Showing 33 changed files with 6,043 additions and 1,867 deletions.
8 changes: 6 additions & 2 deletions botorch/acquisition/logei.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,13 @@ def _get_samples_and_objectives(self, X: Tensor) -> tuple[Tensor, Tensor]:
if not self._cache_root:
samples_full = super().get_posterior_samples(posterior)
obj_full = self.objective(samples_full, X=X_full)
# Calculate the positive index for splitting the samples & objective values.
split_dim = len(obj_full.shape) - 1
# assigning baseline buffers so `best_f` can be computed in _sample_forward
self.baseline_samples, samples = samples_full.split([n_baseline, q], dim=-2)
self.baseline_obj, obj = obj_full.split([n_baseline, q], dim=-1)
self.baseline_samples, samples = samples_full.split(
[n_baseline, q], dim=split_dim
)
self.baseline_obj, obj = obj_full.split([n_baseline, q], dim=split_dim)
return samples, obj

# handle one-to-many input transforms
Expand Down
2 changes: 1 addition & 1 deletion botorch/acquisition/multi_objective/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_default_partitioning_alpha(num_objectives: int) -> float:
BotorchWarning,
stacklevel=3,
)
return 10 ** (-8 + num_objectives)
return 10 ** (-2 if num_objectives >= 6 else -3)


def prune_inferior_points_multi_objective(
Expand Down
7 changes: 6 additions & 1 deletion botorch/models/gpytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ def _apply_noise(
mvn = self.likelihood(mvn, X)
return mvn

# pyre-ignore[14]: Inconsistent override. Could not find parameter
# `Keywords(typing.Any)` in overriding signature.
def posterior(
self,
X: Tensor,
Expand Down Expand Up @@ -470,6 +472,7 @@ def posterior(
return posterior_transform(posterior)
return posterior

# pyre-ignore[14]: Inconsistent override. Could not find parameter `noise`.
def condition_on_observations(
self, X: Tensor, Y: Tensor, **kwargs: Any
) -> BatchedMultiOutputGPyTorchModel:
Expand Down Expand Up @@ -632,7 +635,7 @@ def batch_shape(self) -> torch.Size:
raise NotImplementedError(msg + " that are not broadcastble.")
return next(iter(batch_shapes))

# pyre-fixme[15]: Inconsistent override in return types
# pyre-fixme[14]: Inconsistent override in return types
def posterior(
self,
X: Tensor,
Expand Down Expand Up @@ -838,6 +841,8 @@ def _apply_noise(
)
return self.likelihood(mvn, X)

# pyre-ignore[14]: Inconsistent override. Could not find parameter
# `Keywords(typing.Any)` in overriding signature.
def posterior(
self,
X: Tensor,
Expand Down
Loading

0 comments on commit 8ccbf33

Please sign in to comment.