Skip to content

Commit

Permalink
Remove Fully Bayesian logic in low_rank
Browse files Browse the repository at this point in the history
Summary: Remove the fully Bayesian specialty logic (previously necessary to deal with non-standard batch ranges).

Reviewed By: sdaulton

Differential Revision: D44634780

fbshipit-source-id: d589808345f4fe265ac5e30cf203fdecd49d960c
  • Loading branch information
Balandat authored and facebook-github-bot committed Apr 4, 2023
1 parent 1888ca5 commit f60fc0c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions botorch/utils/low_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,9 @@ def _reshape_base_samples(
mvn = posterior.distribution
loc = mvn.loc
peshape = posterior._extended_shape()
is_fully_b = int(isinstance(posterior, FullyBayesianPosterior))
base_samples = base_samples.view(
sample_shape
+ torch.Size([1 for _ in range(loc.ndim - 1 - is_fully_b)])
+ peshape[-2 - is_fully_b :]
).expand(sample_shape + loc.shape[: -1 - is_fully_b] + peshape[-2 - is_fully_b :])
sample_shape + torch.Size([1] * (loc.ndim - 1)) + peshape[-2:]
).expand(sample_shape + loc.shape[:-1] + peshape[-2:])
if posterior._is_mt:
base_samples = _reshape_base_samples_non_interleaved(
mvn=posterior.distribution,
Expand Down

0 comments on commit f60fc0c

Please sign in to comment.