-
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
Inducing Point Allocators for Sparse GPs #1652
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1652 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 169 170 +1
Lines 14555 14615 +60
=========================================
+ Hits 14555 14615 +60
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Thanks so much for the PR! I've imported it to Meta-internal and someone should be reviewing it soon. To fix the Sphinx documentation error, could you list the new module here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @henrymoss, this is excellent.
At a high level this all looks good to me, I have two main points, one is about the design of the instanstiation of the quality function for _allocate_inducing_points
handled, the other one about avoiding code duplication in _pivoted_cholesky_init
. The rest are mostly nits.
@@ -417,131 +448,3 @@ def init_inducing_points( | |||
var_strat.variational_params_initialized.fill_(0) | |||
|
|||
return inducing_points | |||
|
|||
|
|||
def _select_inducing_points( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting _select_inducing_points
is creating an import error for a downstream library (aepsych). Can _select_inducing_points
either call one of the new functions or raise a deprecation warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we probably don't have to get too crazy in terms of deprecations here since this is a "private" method - @crasanders could we just update aepsych to use the new and shiny initialization strategies here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did you two decide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll fix the aepsych issue ourselves and then will merge those changes together. @esantorella could you take care of this, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I'll put in a PR to aepsych
Hi @esantorella, I tried to do this but made things worse |
Thanks! Looks like there are additionally some citation-related issues. I'll clean those up and make a PR into this branch. |
@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
I think we are ready @Balandat ! |
Most excellent, thanks for all the cleaning up. We'll just fix the aepsych failure on our end and then we can merge this in! |
@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…Torch function to replacement with equivalent behavior Summary: BoTorch `_select_inducing_points` is being deprecated in pytorch/botorch#1652 / D43001106. It is being replaced by more general inducing point allocator functionality; the legacy behavior remains a special case. Differential Revision: D43438578 fbshipit-source-id: d781b8af2adab4e585c091e1b049c2c5271f832a
…Torch function to replacement with equivalent behavior (facebookresearch#235) Summary: Pull Request resolved: facebookresearch#235 BoTorch `_select_inducing_points` is being deprecated in pytorch/botorch#1652 / D43001106. It is being replaced by more general inducing point allocator functionality; the legacy behavior remains a special case. Reviewed By: Balandat Differential Revision: D43438578 fbshipit-source-id: 0e9945490b3f228b0c2eca584e77bb5f58769023
…Torch function to replacement with equivalent behavior (pytorch#235) Summary: X-link: facebookresearch/aepsych#235 BoTorch `_select_inducing_points` is being deprecated in pytorch#1652 / D43001106. It is being replaced by more general inducing point allocator functionality; the legacy behavior remains a special case. Reviewed By: Balandat Differential Revision: D43438578 fbshipit-source-id: 8682707bc6749157b6c81b73cf70e9e54e5ec26c
@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: ## Motivation As requested by eytan, I have had a go at implementing BO-specific inducing point allocation (IPA) strategies from my new paper (https://arxiv.org/abs/2301.10123). These allow you to build sparse Gaussian processes that are somewhat customized to the particular task at hand, be it BO, active learning e.t.c. 1. I have rewritten part of your approximate GP code to allow the specification of custom IPA strategies. 2. BoTorch's existing behaviour (using the greedy variance reduction of Burt et al (2020)) is a special case of the new functionality and remains the default. 3. I have included one of the new IPAs from my paper to help demonstrate how custom IPAs can be defined. The one I chose is quite complicated (requiring access to model from the previous BO step) and so being able to implement it was a good test case to check that this code for custom IPA initialisation isnt stupid. 4. There ended up being a lot of IPA related code, so I moved it all into a utility file, with its own testing file. X-link: pytorch/botorch#1652 Differential Revision: D43556981 Pulled By: esantorella fbshipit-source-id: 4b3a9364888f4043dde971adfbfebe229e922c46
@esantorella merged this pull request in d935d10. |
Summary: Pull Request resolved: #240 ## Motivation As requested by eytan, I have had a go at implementing BO-specific inducing point allocation (IPA) strategies from my new paper (https://arxiv.org/abs/2301.10123). These allow you to build sparse Gaussian processes that are somewhat customized to the particular task at hand, be it BO, active learning e.t.c. 1. I have rewritten part of your approximate GP code to allow the specification of custom IPA strategies. 2. BoTorch's existing behaviour (using the greedy variance reduction of Burt et al (2020)) is a special case of the new functionality and remains the default. 3. I have included one of the new IPAs from my paper to help demonstrate how custom IPAs can be defined. The one I chose is quite complicated (requiring access to model from the previous BO step) and so being able to implement it was a good test case to check that this code for custom IPA initialisation isnt stupid. 4. There ended up being a lot of IPA related code, so I moved it all into a utility file, with its own testing file. X-link: pytorch/botorch#1652 Test Plan: I have added loads of tests in test_inducing_point_allocators.py. I also added some extra tests higher up in the code in test_approximate_gp.py. There is perhaps a little bit of redundancy between the two sets of tests, but they are testing different interfaces. ## Related PRs I will write a follow-up PR with a notebook demonstrating this new inducing point allocation functionality and showing how a user can define their own IPA. Reviewed By: saitcakmak Differential Revision: D43556981 Pulled By: esantorella fbshipit-source-id: 1fd989c00e6dabf302beec5f4bde0279ccaf158b
Motivation
As requested by @eytan, I have had a go at implementing BO-specific inducing point allocation (IPA) strategies from my new paper (https://arxiv.org/abs/2301.10123). These allow you to build sparse Gaussian processes that are somewhat customized to the particular task at hand, be it BO, active learning e.t.c.
Test Plan
I have added loads of tests in test_inducing_point_allocators.py. I also added some extra tests higher up in the code in test_approximate_gp.py. There is perhaps a little bit of redundancy between the two sets of tests, but they are testing different interfaces.
Related PRs
I will write a follow-up PR with a notebook demonstrating this new inducing point allocation functionality and showing how a user can define their own IPA.