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

Minor patch to MVNXPB #1933

Closed
wants to merge 3 commits into from
Closed

Minor patch to MVNXPB #1933

wants to merge 3 commits into from

Conversation

j-wilson
Copy link
Contributor

Overview

This PR introduces a minor fix to the MVNXPB algorithm, so that bounds are properly whitened when computing initial plug-in estimators (which can impact the pivot order).

Test Plan

I have run the existing unit tests locally.

@facebook-github-bot
Copy link
Contributor

Hi @j-wilson!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 11, 2023
@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Comment on lines 186 to 188
bounds_i = bounds_i - torch.einsum(
"...i,...i", L[..., i, :i].clone(), y[..., :i].clone()
).unsqueeze(-1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change to einsum here? The parsing of the formula actually has some overhead - I just tested this, for small dimensions the previous implementation is about 5X faster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good catch. I switched to einsum to avoid allocating additional memory, thinking that it would run at roughly the same speed. Since it's significantly slower, we should probably revert.

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1933 (0b16e99) into main (4b79331) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 0b16e99 differs from pull request most recent head 4e327b3. Consider uploading reports for the commit 4e327b3 to get more accurate results

@@           Coverage Diff           @@
##             main    #1933   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files         176      176           
  Lines       15467    15467           
=======================================
  Hits        15459    15459           
  Misses          8        8           
Impacted Files Coverage Δ
botorch/utils/probability/mvnxpb.py 100.00% <100.00%> (ø)

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

Copy link
Member

@esantorella esantorella left a comment

Choose a reason for hiding this comment

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

LGTM

@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Balandat merged this pull request in a1b38fc.

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. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants