configurable Constraints for each sample #970
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We currently don't have support for nonlinear inequality constraints like these built out, but it should not be too hard to pass them into the optimizer and have scipy deal with them. Essentially, what one would do is to, in addition to equality and inequality constraints, also allow other generic callables as an input to https://github.com/pytorch/botorch/blob/main/botorch/optim/optimize.py#L40, and then properly pass it through the stack to We'd be happy to accept a PR for this. A couple of words of warning though:
|
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
We currently don't have support for nonlinear inequality constraints like these built out, but it should not be too hard to pass them into the optimizer and have scipy deal with them. Essentially, what one would do is to, in addition to equality and inequality constraints, also allow other generic callables as an input to https://github.com/pytorch/botorch/blob/main/botorch/optim/optimize.py#L40, and then properly pass it through the stack to
gen_candidates_scipy
and ultimatelyscipy.optimize.minimize
in https://github.com/pytorch/botorch/blob/a3f8aa98abf55148a18b8f6971137d43d6fb8a9e/botorch/generation/gen.py#L166.We'd be happy to accept a PR for this. A couple of words of warning though: