-
Notifications
You must be signed in to change notification settings - Fork 409
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
[Feature Request] optimize_acqf_homotopy doesn't handle constraints #2579
Comments
Hi @CompRhys. Thanks for flagging this. A PR adding constraint support to |
My preference to implement this would be to add |
I'd like to avoid adding catch-all dict valued arguments to the code. For constraints, would we expect them to be different between the homotopy steps and final optimization? They only constrain the search space, so I would expect them to be the same for both. If that's the case, we can just mirror the signature of
|
I think one problem with not doing it via catch alls it that you end up with what's currently in the code which is very confusing about whether arguments to the loop and final optimizations are intentionally missing or accidentally missing. For example currently in the code if you passed Accepting that it will lead to greater maintenance burden over time I am happy to just add in the extra arguments but if we choose not to create that two catch all dicts the only way to be philosophically consistent in the design here would be to remove the In the draft PR I have implemented the catch-all dict method (https://github.com/pytorch/botorch/pull/2580/files) it still needs some extra tests to check that the constraints work out of the box but to me the logic is fairly clean (although I added a bunch of warnings about incorrect use of arguments). |
That very much sounds like a bug. I think we should fix it rather than using it as inspiration for broader design.
@dme65 can you provide context on why we have different options at different stages? |
This is indeed a bug, thanks!
The main reason for this is that we don't need to solve the problem at a high accuracy (all we try to find is a starting point for the next subproblem that is close enough to the optimum) for all homotopy steps but the least one. As an example, we could do something like this |
This makes sense to me if options: Options for candidate generation. Is very vague, elsewhere in the code there are |
Summary: This PR seeks to address: #2579 `optimize_acqf_homotopy` is a fairly minimal wrapper around `optimize_acqf` but didn't have all the constraint functionality. This PR copies over all of the arguments that we could in principal want to use up into `optimize_acqf_homotopy`. For the time being `final_options` has been kept. The apparent bug with fixed features not being passed to the final optimization has been fixed. a simple dict rather than `OptimizeAcqfInputs` dataclass is used to store the shared parameters. ## Related PRs The original approach in #2580 made use of kwargs which was opposed due to being less explicit. Pull Request resolved: #2588 Reviewed By: Balandat Differential Revision: D64694021 Pulled By: saitcakmak fbshipit-source-id: a10f00f0d069e411e6f12e9eafaec0eba454493d
🚀 Feature Request
Would you accept a PR to add constraints to
optimize_acqf_homotopy
, e.g.inequality_constraints
,equality_constraints
andnonlinear_inequality_constraints
. Looking at the code this seems more like an omission than a technical challenge to add?Motivation
I want to compare gradient free MOO vs SEBO for a mixtures problem requiring sparsity. I believe other people are working on similar problems and would benefit from this functionality (facebook/Ax#2790)
Pitch
Describe the solution you'd like
The change appears as though it should be as simple as making all the arguements of
optimize_acqf
arguements ofoptimize_acqf_homotopy
. This can either be done explicitly or via kwargs (whatever the maintainers prefer).Are you willing to open a pull request? (See CONTRIBUTING)
I am happy to make the PR.
The text was updated successfully, but these errors were encountered: