Skip to content

Conversation

@esantorella
Copy link
Contributor

Summary:
Say someone does the following bad thing:

tf = Standardize(m=1)
tf.untransform_posterior(posterior)

Old behavior:

New behavior:

  • means and standard deviations are initialized as None
  • An informative error is raised

Reviewed By: saitcakmak, Balandat

Differential Revision: D42039100

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

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

@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #1569 (38d8da7) into main (64c6819) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1569   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          153       153           
  Lines        13601     13606    +5     
=========================================
+ Hits         13601     13606    +5     
Impacted Files Coverage Δ
botorch/models/transforms/outcome.py 100.00% <100.00%> (ø)

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

…erior` is used without first calling the transform on outcomes (meta-pytorch#1569)

Summary:
Pull Request resolved: meta-pytorch#1569

Say someone does the following bad thing:

> tf = Standardize(m=1)
> tf.untransform_posterior(posterior)

Old behavior:
- means and standard deviations are initialized in `Standarize.__init__` with a tensor of zeros,  with 'device' not set
- With a posterior on the CPU, the posterior would be nonsensically untransformed with means and standard deviations of zero
- With a posterior on the GPU, this would cause an error about tensors on different devices, e.g.  https://www.internalfb.com/diff/D42019721?dst_version_fbid=1618282175279712&selected_signal=dGVzdF9pZDo1NjI5NTAwMjcwNTY2NTk%3D&selected_signal_verification_phase=1

New behavior:
- means and standard deviations are initialized as None
- An informative error is raised

Reviewed By: saitcakmak, Balandat

Differential Revision: D42039100

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3f89c29.

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.

2 participants