-
Notifications
You must be signed in to change notification settings - Fork 406
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
probabilistic reparameterization #1533
base: main
Are you sure you want to change the base?
Conversation
This pull request was exported from Phabricator. Differential Revision: D41629217 |
This pull request was exported from Phabricator. Differential Revision: D41629217 |
Summary: Pull Request resolved: pytorch#1533 Probabilistic reparameterization Differential Revision: D41629217 fbshipit-source-id: 9e2cbd0686491a20dd12c82e5d86e72542a631df
14b3e2d
to
a83dad6
Compare
botorch/optim/optimize.py
Outdated
@@ -273,7 +276,7 @@ def _optimize_batch_candidates( | |||
if timeout_sec is not None: | |||
timeout_sec = (timeout_sec - start_time) / len(batched_ics) | |||
|
|||
scipy_kws = { | |||
gen_kws = { |
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.
Here the variable is defined as gen_kws
but line 296 uses gen_kwargs
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! I have fixed this in the underlying PR. #1655
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.
Regarding your comment in the PR repo about pure categorical spaces. Here is a WIP notebook on using pure categorical spaces. Not this implementation and notebook is still in development
discrete_mixed_bo_categorical.ipynb.txt
Summary: Pull Request resolved: pytorch#1533 Probabilistic reparameterization Differential Revision: D41629217 fbshipit-source-id: 9b34a786a1e45a9c4d700369bf80b9342c5fa9b3
a83dad6
to
e313e4c
Compare
This pull request was exported from Phabricator. Differential Revision: D41629217 |
Summary: Pull Request resolved: pytorch#1533 Probabilistic reparameterization Differential Revision: https://internalfb.com/D41629217 fbshipit-source-id: 0c30ef871080aa1b55c20b808212dfff39479f66
Codecov Report
@@ Coverage Diff @@
## main #1533 +/- ##
===========================================
- Coverage 100.00% 97.29% -2.71%
===========================================
Files 169 171 +2
Lines 14518 14949 +431
===========================================
+ Hits 14518 14544 +26
- Misses 0 405 +405
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hello @sdaulton. Thank you for providing the notebook. However it does not seem to work for me (I'm using commit
Which gives I tried adding the line
This seems to get the code to progress but then a different error is triggered on line 366 of Am I using the correct commit? You can run the notebook without errors? |
Summary: Pull Request resolved: pytorch#1532 Add a wrapper for modifying inputs/outputs. This is useful for not only probabilistic reparameterization, but will also simplify other integrated AFs (e.g. MCMC) as well as fixed feature AFs and things like prior-guided AFs Differential Revision: https://internalfb.com/D41629186 fbshipit-source-id: c2d3b339edf44a3167804b095d213b3ba98b5e13
Summary: Creates a new helper method for checking both if a given AF is an instance of a class or if the given AF wraps a base AF that is an instance of a class Differential Revision: D43127722 fbshipit-source-id: 9f5f31b991f15f2b32931f1b9625422c7907495d
Summary: Pull Request resolved: pytorch#1533 Probabilistic reparameterization Differential Revision: D41629217 fbshipit-source-id: a6067c73ce534daf6f6a180fc49720f305827d58
e313e4c
to
7ce1389
Compare
This pull request was exported from Phabricator. Differential Revision: D41629217 |
Summary: Pull Request resolved: pytorch#1533 Probabilistic reparameterization Differential Revision: https://internalfb.com/D41629217 fbshipit-source-id: f0719b974a8b9de4a1fe8fb62a9c73e9a1fbb551
@hkenlay Sorry about that. I forgot to include the changes in there for categoricals. Let me know if you still have issues on 7ce1389 |
Works great, and really exciting work, thanks @sdaulton. |
Hi @sdaulton! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Not at the moment. It's been fairly low priority. If this is of interest, I can work on prioritizing getting it ready |
Thanks @sdaulton. I recently went through the paper, fantastic piece of work! I'd be very interested to try it out with botorch, especially to check out in practice how the new approach results in a speed-up over the brute-force combinatorical approach for mixed search spaces where the discrete parameter space contains several dimensions and levels. |
I recently read your interesting work. @sdaulton I try to use it in parallel chemical reaction optimization. In the notebook you provide I changed candidates, _ = optimize_acqf(
acq_function=pr_acq_func,
bounds=standard_bounds,
q=2,
num_restarts=NUM_RESTARTS,
raw_samples=RAW_SAMPLES, # used for intialization heuristic
options={
"batch_limit": 5,
"maxiter": 200,
"rel_tol": float("-inf"), # run for a full 200 steps
},
# use Adam for Monte Carlo PR
gen_candidates=gen_candidates_torch if not analytic else gen_candidates_scipy,
) which raises error: |
Hi @Ruan-Yixiang, We didn't test |
thanks for your apply! @sdaulton I may continue trying it. By the way, I tested the wall time of MC PR. It is strange that |
@sdaulton Hi, may I ask if this PR is in progress? :) |
Summary: Probabilistic reparameterization
Differential Revision: D41629217