Commit 48dd731
Tidy-up feasibility evaluation in
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to make BoTorch better.
Help us understand your motivation by explaining why you decided to make this change.
You can learn more about contributing to BoTorch here: https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md
-->
## Motivation
As discussed with esantorella in #2944 (comment), this PR tidies-up the feasibility evaluation in `optimize_mixed_alternating.` It is now refactored in a way that it uses `optim.parameter_constraints.evaluate_feasibility`, which improves code sharing.
Regarding nonlinear inequality constraints that were also discussed in the thread above, I faced the problem that nonlinear constraints only work with a batch limit of 1, which would render `optimize_mixed_alternating` highly inefficient as it makes use of batch optimization. So, I think, we have to first get rid of the limitation of `batch_limit==1` for nonlinear constraints. Should I create a separate issue for this?
### Have you read the [Contributing Guidelines on pull requests](https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#pull-requests)?
Yes.
Pull Request resolved: #2952
Test Plan: Unit tests.
Reviewed By: Balandat
Differential Revision: D79644900
Pulled By: saitcakmak
fbshipit-source-id: d7bfa0905ffc489f79d815f97a4444f5914e8915optimize_mixed_alternating (#2952)1 parent 359d9ee commit 48dd731
1 file changed
+9
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
| |||
0 commit comments