Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TransformedPosterior missing batch shape error in _update_base_samples #1625

Closed
wants to merge 1 commit into from

Conversation

saitcakmak
Copy link
Contributor

Summary: See #1623. This is the only use case for posterior.batch_shape, so fixing it locally makes sense to me.

Differential Revision: D42421494

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Jan 9, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D42421494

@saitcakmak saitcakmak linked an issue Jan 9, 2023 that may be closed by this pull request
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D42421494

saitcakmak added a commit to saitcakmak/botorch that referenced this pull request Jan 9, 2023
…mples (pytorch#1625)

Summary:
Pull Request resolved: pytorch#1625

See pytorch#1623. This is the only use case for `posterior.batch_shape`, so fixing it locally makes sense to me.

Differential Revision: D42421494

fbshipit-source-id: 6de08cf0aee948a29f8e128cbded850e2d507608
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Merging #1625 (83e07d6) into main (c2e502c) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1625   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          154       154           
  Lines        13776     13778    +2     
=========================================
+ Hits         13776     13778    +2     
Impacted Files Coverage Δ
botorch/sampling/normal.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@Balandat Balandat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix

IIDNormalSampler(sample_shape=torch.Size([2])),
IIDNormalSampler(sample_shape=torch.Size([2])),
)
# This calls _set_sampler which would previously fail.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously w.r.t to what? This PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's update the comment with what the test does specifically rather than saying "previously"? The context will get lost.

…mples (pytorch#1625)

Summary:
Pull Request resolved: pytorch#1625

See pytorch#1623. This is the only use case for `posterior.batch_shape`, so fixing it locally makes sense to me.

Reviewed By: Balandat

Differential Revision: D42421494

fbshipit-source-id: 2f6afc41c573419e9aa979f34036b7e30a6802d4
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D42421494

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3596b12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Batch shape missing in TransformedPosterior
3 participants