Commit 8569f4f
Allow continuous relaxation of inequality-constrained ordinal dims
Summary:
`_setup_continuous_relaxation` in `optimize_mixed.py` blanket-excludes all
constrained discrete dimensions from continuous relaxation, forcing them into
discrete local search even when they have high cardinality. This is overly
conservative for inequality constraints and causes severe performance
degradation.
**Problem:** When ordinal parameters (e.g., integers 0-50) participate in
linear inequality constraints (e.g., `x1 + x2 + x3 <= 100`), they are kept
as discrete dims regardless of cardinality. In mixed search spaces, this
inflates the discrete combination count (e.g., 51^4 x 20 = 135M), forces
`optimize_acqf_mixed_alternating`, and with default optimizer budgets
(`raw_samples=1024`, `maxiter_init=100`, `maxiter_alternating=64`) across
many sequential candidates, produces ~900K+ acquisition function evaluations
-- taking hours instead of minutes.
**Fix:** Only exclude dimensions participating in **equality** constraints
from continuous relaxation. Inequality-constrained dims are now eligible for
relaxation because `_optimize_acqf_batch` already handles rounding-induced
constraint violations: it applies `post_processing_func` (rounding), checks
feasibility, projects infeasible candidates back via SLSQP, and re-rounds
(see `optimize.py` lines 528-574).
**Why this is safe for inequality but not equality constraints:**
- *Inequality*: The feasible region has interior. SLSQP easily finds a nearby
feasible point after rounding, and re-rounding a near-integer point rarely
re-violates.
- *Equality*: The feasible set is a hyperplane. Rounding pushes points off the
hyperplane, SLSQP projects back (to a non-integer point), re-rounding pushes
off again -- the cycle may not converge.
Differential Revision: D993048001 parent b16b28f commit 8569f4f
2 files changed
Lines changed: 67 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
138 | 145 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1612 | 1612 | | |
1613 | 1613 | | |
1614 | 1614 | | |
1615 | | - | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
1616 | 1620 | | |
1617 | 1621 | | |
1618 | 1622 | | |
1619 | | - | |
| 1623 | + | |
1620 | 1624 | | |
1621 | 1625 | | |
1622 | 1626 | | |
1623 | | - | |
| 1627 | + | |
1624 | 1628 | | |
1625 | 1629 | | |
1626 | 1630 | | |
1627 | | - | |
| 1631 | + | |
1628 | 1632 | | |
1629 | 1633 | | |
1630 | 1634 | | |
1631 | 1635 | | |
1632 | 1636 | | |
1633 | 1637 | | |
1634 | 1638 | | |
1635 | | - | |
1636 | 1639 | | |
1637 | 1640 | | |
1638 | 1641 | | |
1639 | 1642 | | |
1640 | 1643 | | |
1641 | 1644 | | |
1642 | | - | |
| 1645 | + | |
1643 | 1646 | | |
1644 | | - | |
1645 | | - | |
| 1647 | + | |
1646 | 1648 | | |
1647 | | - | |
1648 | 1649 | | |
1649 | | - | |
| 1650 | + | |
1650 | 1651 | | |
1651 | | - | |
| 1652 | + | |
1652 | 1653 | | |
1653 | 1654 | | |
1654 | 1655 | | |
1655 | 1656 | | |
1656 | | - | |
1657 | 1657 | | |
1658 | 1658 | | |
1659 | 1659 | | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
1660 | 1701 | | |
1661 | 1702 | | |
1662 | 1703 | | |
1663 | | - | |
| 1704 | + | |
1664 | 1705 | | |
1665 | 1706 | | |
1666 | 1707 | | |
| |||
0 commit comments