-
Notifications
You must be signed in to change notification settings - Fork 311
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
Nonlinear parameter constraints #153
Comments
@yiyinying, I don't think it's currently supported, but may I learn what kind of a constraint you are looking to define, as well as whether it is a parameter constraint or an outcome metric constraint? |
Should be a parameter constraint。 |
We currently don't support general non-linear parameter constraints. Is there a way you can reparameterize the constraint? E.g. in your example you'd have a single parameter May I ask what your use case is? In principle it's possible to support nonlinear parameter constraints, but it would require a significant amount of work (and it would slow down candidate generation significantly as well). |
@yiyinying, does @Balandat's solution with parameterizing the constraint work for your use case? If not, could you tell us a bit more about your use case, so that we can consider supporting it? |
@lena-kashtelyan @Balandat I have a practical constraint that I don't believe can be sensibly supported without nonlinear constraints: I can also explain where that constraint comes from if you'd like. |
I'd be curious to hear @Balandat's thoughts on this one. |
So More generally, in principle non-linear constraints on the parameters are doable since generating new points already requires solving a nonlinear optimization problem. However, depending on the shape of the constraint set, the GP models we use may not work particularly well on non-convex and possibly non-connected domains. Regarding the mechanics: We currently use SLSQP from |
"So n_envs, n_steps and minibatches are all parameters here?" Yep. One is 1-4, one is 1-125, and one is 4-4096, so I can't just get a list of valid points. I turned the 4-4096 one into a 0,1 float and round the value from the model down to the nearest compatible value with the other two. "However, depending on the shape of the constraint set, the GP models we use may not work particularly well on non-convex and possibly non-connected domains." -Allowing for nonlinear constraints would significantly improve the convexity of a lot of problems. E.g. from a previous example of yours, if the constraint needs to be sin(x) and you accordingly transform x into sin(x) the optimization will probably be much less nice and convex. The same applies for my modulo problem. -It wouldn't be too hard to test the shape of the space after constraint to make sure it's not pathological right? |
We will now be tracking wishlist items / feature requests in a master issue for improved visibility: #566. Of course please feel free to still open new feature requests issues; we'll take care of thinking them through and adding them to the master issue. |
Hi, I believe that Ax should be now able to adopt nonlinear constraints in input parameters, since BoTorch now has merged pytorch/botorch#1067 |
xref: #786 |
How to define nonlinear constraints
The text was updated successfully, but these errors were encountered: