-
Notifications
You must be signed in to change notification settings - Fork 410
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
Add ability to mix batch initial conditions and internal IC generation #2610
Conversation
f3c63bb
to
10e7209
Compare
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. Seems like you have some dtype
test issues to fix.
Also, if you rebase on the most recent main branch you don't have to run the conda test in the CI :)
b5b7fe5
to
c1e6d32
Compare
locally tests still failing for |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2610 +/- ##
=======================================
Coverage 99.98% 99.98%
=======================================
Files 196 196
Lines 17377 17410 +33
=======================================
+ Hits 17375 17408 +33
Misses 2 2 ☔ View full report in Codecov by Sentry. |
a2714e0
to
4b1196b
Compare
@saitcakmak has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Looks like the PR is out of sync with the main branch. Can you do another rebase please? |
In this PR as stands I was confused about the roles of q and raw_samples in the Yes this PR doesn't achieve what I intended. This was written against raw_samples but it should be against n_restarts to match the original intent. |
e38a3ca
to
570a2cb
Compare
@saitcakmak I redid this whole thing after realizing that I had got confused and failed to implement what I originally intended by following |
Apologies for linting.. Two solutions to the homotopy test failure:
for i in range(5):
# assert that the number of restarts are repopulated at each step
self.assertEqual(
prune_candidates_mock.call_args_list[i][1]["candidates"].shape,
torch.Size([4, 1]),
)
# assert that the candidates are pruned to just one candidate
self.assertEqual(
prune_candidates(**prune_candidates_mock.call_args_list[i][1]).shape,
torch.Size([1, 1]),
)
To get current behaviour the second option is better, but in principal despite the fact that random IC designs introduced later in the homotopy might not be able to be as readily optimized to sparsity the first option doesn't seem harmful (beyond there being no computational benefit to pruning) and may have upsides. |
There is one remaining test failure and a rebase seems to be necessary. Lgtm otherwise |
1ee598c
to
b6f8b85
Compare
@saitcakmak has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Btw @CompRhys for future reference this is not really necessary - the actual commit on the main branch will be made by our github bot (while maintaining attribution to the PR author), which automatically squashes all the changes together. |
@saitcakmak has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
couple of minor nits, o/w this is good to go. If you merge in the recent changes on master that will also fix the tutorial failure.
address internal linter errors and better error message Co-authored-by: Max Balandat <[email protected]>
@saitcakmak has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@saitcakmak merged this pull request in 4190f74. |
Summary: ## Motivation In order to get facebook/Ax#2938 over the line with initial candidate generation that obey the constraints we want to use the existing tooling within `botorch`. The hard coded logic currently in Ax uses topk to downselect the sobol samples. To make a change there that will not impact existing users we then need to implement topk downselection in `botorch`. Pull Request resolved: #2636 Test Plan: TODO: - [x] add tests for initialize_q_batch_topk ## Related PRs facebook/Ax#2938. (#2610 was initially intended to play part of this solution but then I realized that the pattern I wanted to use was conflating repeats and the batch dimension.) Reviewed By: Balandat Differential Revision: D66413947 Pulled By: saitcakmak fbshipit-source-id: 39e71f5cc0468d554419fa25dd545d9ee25289dc
Motivation
See #2609
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Basic testing of the code is easy the challenge is working out what the run on implications might be, will this break people's code?
Related PRs
facebook/Ax#2938