BONSAI: pin-and-project for constrained pruning (#5180)#5180
Closed
sdaulton wants to merge 1 commit intofacebook:mainfrom
Closed
BONSAI: pin-and-project for constrained pruning (#5180)#5180sdaulton wants to merge 1 commit intofacebook:mainfrom
sdaulton wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@sdaulton has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100256483. |
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Apr 17, 2026
Summary: Pull Request resolved: facebook#5180 Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
6feb7a2 to
541eed7
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Apr 17, 2026
Summary: Pull Request resolved: facebook#5180 Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
541eed7 to
f00e644
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Apr 17, 2026
Summary: Pull Request resolved: facebook#5180 Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
f00e644 to
b91c190
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5180 +/- ##
==========================================
- Coverage 96.38% 96.38% -0.01%
==========================================
Files 617 617
Lines 69494 69567 +73
==========================================
+ Hits 66985 67054 +69
- Misses 2509 2513 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Apr 20, 2026
Summary: Pull Request resolved: facebook#5180 Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
b91c190 to
ade1397
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Apr 21, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
ade1397 to
2530a77
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
Apr 30, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 1, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
2530a77 to
0686264
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 1, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 1, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Differential Revision: D100256483
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 5, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 5, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 5, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 5, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
0686264 to
63e3344
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 5, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
63e3344 to
f244ef2
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 5, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
f244ef2 to
51fec6e
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 6, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
51fec6e to
f55a264
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 6, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
f55a264 to
4150bb8
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 7, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
4150bb8 to
ea4c20e
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 7, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
ea4c20e to
4b2b441
Compare
sdaulton
added a commit
to sdaulton/Ax-1
that referenced
this pull request
May 8, 2026
Summary: Extend BONSAI's irrelevance pruning to handle both equality and inequality constraints via a pin-and-project approach. Previously, BONSAI simply discarded pruned candidates that violated constraints. This was overly conservative (inequality) or completely broken (equality, where almost all single-dimension prunes violate the constraint). The new approach: 1. Set x_j = target[j] (unchanged) 2. Project the other dimensions onto the feasible set via SLSQP, keeping x_j pinned (and all previously pruned dims pinned) 3. Filter any candidates that remain infeasible after projection This is strictly better than discarding: it recovers feasibility when possible by adjusting other dimensions, while infeasible pins (where no adjustment can satisfy the constraints) are still caught. Key implementation details: - `_project_and_filter_pruned_candidates`: new function that uses `project_to_feasible_space_via_slsqp` with `fixed_features` to pin the pruned dim and all previously pruned dims. - Optimization: skip projection for dims not in any constraint's index set (pruning them can't violate anything). - Handles 2D inter-point constraint indices correctly. - `_prune_irrelevant_parameters` now accepts `bounds` parameter. Reviewed By: esantorella Differential Revision: D100256483
|
This pull request has been merged in cd36879. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Extend BONSAI's irrelevance pruning to handle both equality and inequality
constraints via a pin-and-project approach. Previously, BONSAI simply
discarded pruned candidates that violated constraints. This was overly
conservative (inequality) or completely broken (equality, where almost all
single-dimension prunes violate the constraint).
The new approach:
x_j pinned (and all previously pruned dims pinned)
This is strictly better than discarding: it recovers feasibility when
possible by adjusting other dimensions, while infeasible pins (where no
adjustment can satisfy the constraints) are still caught.
Key implementation details:
_project_and_filter_pruned_candidates: new function that usesproject_to_feasible_space_via_slsqpwithfixed_featuresto pinthe pruned dim and all previously pruned dims.
set (pruning them can't violate anything).
_prune_irrelevant_parametersnow acceptsboundsparameter.Reviewed By: esantorella
Differential Revision: D100256483