Commit a43bd4d
Update nonlinear_constraint_is_feasible to return a boolean tensor (#2731)
Summary:
Pull Request resolved: #2731
`nonlinear_constraint_is_feasible` checks whether the constraint is feasible for the given (batch of) candidates. Previously, this returned a boolean, which was False if any element of the batch was infeasible. This diff updates it to return a boolean tensor that shows whether each batch is feasible. Use cases are updated to comply with the new behavior.
I'll utilize this in a follow up diff to introduce a helper that evaluates the feasibility of all forms of constraints.
Reviewed By: dme65
Differential Revision: D69209007
fbshipit-source-id: 4f63ee6824734c3eb5c96bb5b1cf47a17d51b2981 parent 8bda455 commit a43bd4d
File tree
3 files changed
+27
-20
lines changed- botorch
- generation
- optim
- test/optim
3 files changed
+27
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
272 | 277 | | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
278 | | - | |
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
| 525 | + | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
| 528 | + | |
| 529 | + | |
529 | 530 | | |
530 | 531 | | |
531 | 532 | | |
532 | 533 | | |
533 | 534 | | |
534 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
535 | 538 | | |
536 | | - | |
537 | | - | |
| 539 | + | |
538 | 540 | | |
539 | | - | |
540 | | - | |
541 | | - | |
| 541 | + | |
| 542 | + | |
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
| |||
589 | 590 | | |
590 | 591 | | |
591 | 592 | | |
592 | | - | |
| 593 | + | |
593 | 594 | | |
594 | 595 | | |
595 | 596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| |||
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
384 | | - | |
| 385 | + | |
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
391 | | - | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
398 | 399 | | |
399 | | - | |
| 400 | + | |
| 401 | + | |
400 | 402 | | |
401 | 403 | | |
402 | 404 | | |
| |||
0 commit comments