-
Notifications
You must be signed in to change notification settings - Fork 400
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
Introduce fast_optimize
context manager to speed up testing
#2563
Conversation
This pull request was exported from Phabricator. Differential Revision: D63838626 |
…h#2563) Summary: Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's `fast_botorch_optimize`, this commit introduces the same thing to BoTorch, with the exception of `fit_fully_bayesian_model_nuts`. A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch. This PR: * Introduces `fast_optimize`, which is the same as Ax's `fast_botorch_optimize`, but with different import paths. * Applies it to a slow test, reducing runtime to 2s from 6s-10s. Differential Revision: D63838626
b8d497c
to
91307aa
Compare
This pull request was exported from Phabricator. Differential Revision: D63838626 |
…h#2563) Summary: Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's `fast_botorch_optimize`, this commit introduces the same thing to BoTorch, with the exception of `fit_fully_bayesian_model_nuts`. A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch. This PR: * Introduces `fast_optimize`, which is the same as Ax's `fast_botorch_optimize`, but with different import paths. * Applies it to a slow test, reducing runtime to 2s from 6s-10s. Differential Revision: D63838626
91307aa
to
7b69393
Compare
This pull request was exported from Phabricator. Differential Revision: D63838626 |
…h#2563) Summary: Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's `fast_botorch_optimize`, this commit introduces the same thing to BoTorch, with the exception of `fit_fully_bayesian_model_nuts`. A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch. This PR: * Introduces `fast_optimize`, which is the same as Ax's `fast_botorch_optimize`, but with different import paths. * Applies it to a slow test, reducing runtime to 2s from 6s-10s. Differential Revision: D63838626
…h#2563) Summary: Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's `fast_botorch_optimize`, this commit introduces the same thing to BoTorch, with the exception of `fit_fully_bayesian_model_nuts`. A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch. This PR: * Introduces `fast_optimize`, which is the same as Ax's `fast_botorch_optimize`, but with different import paths. * Applies it to a slow test, reducing runtime to 2s from 6s-10s. Differential Revision: D63838626
7b69393
to
6db80db
Compare
This pull request was exported from Phabricator. Differential Revision: D63838626 |
…h#2563) Summary: Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's `fast_botorch_optimize`, this commit introduces the same thing to BoTorch, with the exception of `fit_fully_bayesian_model_nuts`. A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch. This PR: * Introduces `fast_optimize`, which is the same as Ax's `fast_botorch_optimize`, but with different import paths. * Applies it to a slow test, reducing runtime to 2s from 6s-10s. Differential Revision: D63838626
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2563 +/- ##
=======================================
Coverage 99.98% 99.98%
=======================================
Files 193 195 +2
Lines 17071 17112 +41
=======================================
+ Hits 17068 17109 +41
Misses 3 3 ☔ View full report in Codecov by Sentry. |
…h#2563) Summary: Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's `fast_botorch_optimize`, this commit introduces the same thing to BoTorch, with the exception of `fit_fully_bayesian_model_nuts`. A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch. This PR: * Introduces `fast_optimize`, which is the same as Ax's `fast_botorch_optimize`, but with different import paths. * Applies it to a slow test, reducing runtime to 2s from 6s-10s. Reviewed By: sdaulton Differential Revision: D63838626
6db80db
to
cfccf35
Compare
…h#2563) Summary: Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's `fast_botorch_optimize`, this commit introduces the same thing to BoTorch, with the exception of `fit_fully_bayesian_model_nuts`. A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch. This PR: * Introduces `fast_optimize`, which is the same as Ax's `fast_botorch_optimize`, but with different import paths. * Applies it to a slow test, reducing runtime to 2s from 6s-10s. Reviewed By: sdaulton Differential Revision: D63838626
This pull request was exported from Phabricator. Differential Revision: D63838626 |
This pull request has been merged in db2e947. |
Summary:
Context: Many BoTorch tests take a while because they run optimization code. But it's good that this code runs rather than being avoided or mocked out, becuase the tests are ensuring that things work end-to-end. Borrowing a page from Ax's
fast_botorch_optimize
, this commit introduces the same thing to BoTorch, with the exception offit_fully_bayesian_model_nuts
.A future commit to Ax can remove that functionality from Ax in favor of importing it from BoTorch, but we might not want to do it right way because then Ax won't work with older versions of BoTorch.
This PR:
fast_optimize
, which is the same as Ax'sfast_botorch_optimize
, but with different import paths.Differential Revision: D63838626