-
Notifications
You must be signed in to change notification settings - Fork 404
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
[Bug] AffineInputTransform
does not check dimensions after training
#2509
Labels
bug
Something isn't working
Comments
Good catch, thanks for reporting! We'll put in a fix. |
esantorella
added a commit
to esantorella/botorch
that referenced
this issue
Sep 6, 2024
…, even in eval mode Summary: Context: pytorch#2509 gives a clear overview This PR: * Checks the shape of the `X` provided to an `AffineInputTransform` when it transforms the data, regardless of whether it is updating the coefficients. Makes some unrelated changes: * Fixes the example in the docstring for `batched_multi_output_to_single_output` * fixes an incorrect shape in `test_approximate_gp` * Makes data and transform batch shapes match in `TestConverters`, since those usages will now (appropriately) error Differential Revision: D62318530
esantorella
added a commit
to esantorella/botorch
that referenced
this issue
Sep 6, 2024
…, even in eval mode (pytorch#2510) Summary: Pull Request resolved: pytorch#2510 Context: pytorch#2509 gives a clear overview This PR: * Checks the shape of the `X` provided to an `AffineInputTransform` when it transforms the data, regardless of whether it is updating the coefficients. Makes some unrelated changes: * Fixes the example in the docstring for `batched_multi_output_to_single_output` * fixes an incorrect shape in `test_approximate_gp` * Makes data and transform batch shapes match in `TestConverters`, since those usages will now (appropriately) error Differential Revision: D62318530
esantorella
added a commit
to esantorella/botorch
that referenced
this issue
Sep 6, 2024
…, even in eval mode (pytorch#2510) Summary: Pull Request resolved: pytorch#2510 Context: pytorch#2509 gives a clear overview This PR: * Checks the shape of the `X` provided to an `AffineInputTransform` when it transforms the data, regardless of whether it is updating the coefficients. Makes some unrelated changes: * Fixes the example in the docstring for `batched_multi_output_to_single_output` * fixes an incorrect shape in `test_approximate_gp` * Makes data and transform batch shapes match in `TestConverters`, since those usages will now (appropriately) error Reviewed By: saitcakmak Differential Revision: D62318530
esantorella
added a commit
to esantorella/botorch
that referenced
this issue
Sep 6, 2024
…, even in eval mode (pytorch#2510) Summary: Pull Request resolved: pytorch#2510 Context: pytorch#2509 gives a clear overview This PR: * Checks the shape of the `X` provided to an `AffineInputTransform` when it transforms the data, regardless of whether it is updating the coefficients. Makes some unrelated changes: * Fixes the example in the docstring for `batched_multi_output_to_single_output` * fixes an incorrect shape in `test_approximate_gp` * Makes data and transform batch shapes match in `TestConverters`, since those usages will now (appropriately) error Reviewed By: saitcakmak Differential Revision: D62318530
esantorella
added a commit
to esantorella/botorch
that referenced
this issue
Sep 6, 2024
…, even in eval mode (pytorch#2510) Summary: Pull Request resolved: pytorch#2510 Context: pytorch#2509 gives a clear overview This PR: * Checks the shape of the `X` provided to an `AffineInputTransform` when it transforms the data, regardless of whether it is updating the coefficients. Makes some unrelated changes: * Fixes the example in the docstring for `batched_multi_output_to_single_output` * fixes an incorrect shape in `test_approximate_gp` * Makes data and transform batch shapes match in `TestConverters`, since those usages will now (appropriately) error Reviewed By: saitcakmak Differential Revision: D62318530
facebook-github-bot
pushed a commit
that referenced
this issue
Sep 9, 2024
…, even in eval mode (#2510) Summary: Context: #2509 gives a clear overview This PR: * Checks the shape of the `X` provided to an `AffineInputTransform` when it transforms the data, regardless of whether it is updating the coefficients. Makes some unrelated changes: * Fixes the example in the docstring for `batched_multi_output_to_single_output` * fixes an incorrect shape in `test_approximate_gp` * Makes data and transform batch shapes match in `TestConverters`, since those usages will now (appropriately) error Pull Request resolved: #2510 Reviewed By: saitcakmak Differential Revision: D62318530 Pulled By: esantorella fbshipit-source-id: eaa8b0410c49b17d6abbe1391bbb0750313aea23
Closed by #2510 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug
AffineInputTransform
does not always check the shape of tensors when transforming or untransforming, which can result in confusing behaviour: when a tensor of shape[..., 1]
is passed and it expects a tensor of shape[..., d]
, it will broadcast it up to the expected dimension when (un)transforming.To reproduce
** Code snippet to reproduce **
** Stack trace/error message **
No error, which is the problem!
Expected Behavior
self._check_shape(X)
should always be called during_transform
and_untransform
.The text was updated successfully, but these errors were encountered: