-
Notifications
You must be signed in to change notification settings - Fork 415
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
Change how ModelListGP.posterior evaluates sub-models #1854
Conversation
This pull request was exported from Phabricator. Differential Revision: D46364187 |
…ytorch#1854) Summary: Pull Request resolved: pytorch#1854 Prior to this change, `ModelListGP.posterior` would call it's submodels directly and work with the returned MVNs, skipping any processing in the individual `posterior` methods. This was particularly consequential for the `MultiTaskGP` (and subclasses) where skipping the `posterior` meant changing the expected shape of the `X` required by the `posterior`. With this change, `ModelListGP.posterior` evaluates the `posterior` methods for each of its submodels, and combines the MVNs into a single MVN where applicable. For `MultiTaskGP`, this makes it so that the `posterior` can be evaluated using the same inputs regardless of whether the mdoel is wrapped in a `ModelListGP` or not. Differential Revision: D46364187 fbshipit-source-id: 8e0ee449070607224fa6cd8510ed973a0c0da0c7
52528ee
to
be5019b
Compare
This pull request was exported from Phabricator. Differential Revision: D46364187 |
…ytorch#1854) Summary: Pull Request resolved: pytorch#1854 Prior to this change, `ModelListGP.posterior` would call it's submodels directly and work with the returned MVNs, skipping any processing in the individual `posterior` methods. This was particularly consequential for the `MultiTaskGP` (and subclasses) where skipping the `posterior` meant changing the expected shape of the `X` required by the `posterior`. With this change, `ModelListGP.posterior` evaluates the `posterior` methods for each of its submodels, and combines the MVNs into a single MVN where applicable. For `MultiTaskGP`, this makes it so that the `posterior` can be evaluated using the same inputs regardless of whether the mdoel is wrapped in a `ModelListGP` or not. Differential Revision: D46364187 fbshipit-source-id: e3af2a582037c66dd1f24d565b789f2085c9a28c
be5019b
to
1b54268
Compare
This pull request was exported from Phabricator. Differential Revision: D46364187 |
…ytorch#1854) Summary: Pull Request resolved: pytorch#1854 Prior to this change, `ModelListGP.posterior` would call it's submodels directly and work with the returned MVNs, skipping any processing in the individual `posterior` methods. This was particularly consequential for the `MultiTaskGP` (and subclasses) where skipping the `posterior` meant changing the expected shape of the `X` required by the `posterior`. With this change, `ModelListGP.posterior` evaluates the `posterior` methods for each of its submodels, and combines the MVNs into a single MVN where applicable. For `MultiTaskGP`, this makes it so that the `posterior` can be evaluated using the same inputs regardless of whether the mdoel is wrapped in a `ModelListGP` or not. Differential Revision: D46364187 fbshipit-source-id: 0a506c0a98454e6cfa9ac0068602f8098f31010b
1b54268
to
ba3d108
Compare
This pull request was exported from Phabricator. Differential Revision: D46364187 |
Codecov Report
@@ Coverage Diff @@
## main #1854 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 171 171
Lines 15055 15051 -4
=========================================
- Hits 15055 15051 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Summary: Prior to this change, `MultiTaskGP` could be evaluated using inputs of shape `batch x d` when using the model directly, and using inputs of shape `batch x d + 1` when the model was wrapped in a `ModelListGP`. This diff (combined with pytorch#1854) legitimizes both input shapes regardless of what API is used to evaluate the model. This will unify the APIs and increase the flexibility in how the model is used. Differential Revision: D46496775 fbshipit-source-id: 3a11aa5a1a6b79456a57491dac561a3a1860c14b
…h#1868) Summary: Pull Request resolved: pytorch#1868 Prior to this change, `MultiTaskGP` could be evaluated using inputs of shape `batch x d` when using the model directly, and using inputs of shape `batch x d + 1` when the model was wrapped in a `ModelListGP`. This diff (combined with pytorch#1854) legitimizes both input shapes regardless of what API is used to evaluate the model. This will unify the APIs and increase the flexibility in how the model is used. Reviewed By: Balandat Differential Revision: D46496775 fbshipit-source-id: f44f5e529d9105d203923013101c37a8c1697e52
…h#1868) Summary: Pull Request resolved: pytorch#1868 Prior to this change, `MultiTaskGP` could be evaluated using inputs of shape `batch x d` when using the model directly, and using inputs of shape `batch x d + 1` when the model was wrapped in a `ModelListGP`. This diff (combined with pytorch#1854) legitimizes both input shapes regardless of what API is used to evaluate the model. This will unify the APIs and increase the flexibility in how the model is used. Differential Revision: https://internalfb.com/D46496775 fbshipit-source-id: e79dee0cc0ba0cd03fb97382cc1eb9ef4e5a8371
Summary: Pull Request resolved: pytorch#1854 Prior to this change, `ModelListGP.posterior` would call it's submodels directly and work with the returned MVNs, skipping any processing in the individual `posterior` methods. This was particularly consequential for the `MultiTaskGP` (and subclasses) where skipping the `posterior` meant changing the expected shape of the `X` required by the `posterior`. With this change, `ModelListGP.posterior` evaluates the `posterior` methods for each of its submodels, and combines the MVNs into a single MVN where applicable. For `MultiTaskGP`, this makes it so that the `posterior` can be evaluated using the same inputs regardless of whether the model is wrapped in a `ModelListGP` or not. Differential Revision: D46364187 fbshipit-source-id: a2b8293f71fd4be28d7e665e8fc0ab338b9bf601
ba3d108
to
a7a3491
Compare
This pull request was exported from Phabricator. Differential Revision: D46364187 |
Summary: Pull Request resolved: #1868 Prior to this change, `MultiTaskGP` could be evaluated using inputs of shape `batch x d` when using the model directly, and using inputs of shape `batch x d + 1` when the model was wrapped in a `ModelListGP`. This diff (combined with #1854) legitimizes both input shapes regardless of what API is used to evaluate the model. This will unify the APIs and increase the flexibility in how the model is used. Reviewed By: Balandat Differential Revision: D46496775 fbshipit-source-id: 1de8e38ef1c4643f9006675058761e1b252acc03
This pull request has been merged in ffff366. |
Summary:
Prior to this change,
ModelListGP.posterior
would call it's submodels directly and work with the returned MVNs, skipping any processing in the individualposterior
methods. This was particularly consequential for theMultiTaskGP
(and subclasses) where skipping theposterior
meant changing the expected shape of theX
required by theposterior
.With this change,
ModelListGP.posterior
evaluates theposterior
methods for each of its submodels, and combines the MVNs into a single MVN where applicable. ForMultiTaskGP
, this makes it so that theposterior
can be evaluated using the same inputs regardless of whether the mdoel is wrapped in aModelListGP
or not.Differential Revision: D46364187