Skip to content

BONSAI: pin-and-project for constrained pruning (#5180)#5180

Closed
sdaulton wants to merge 1 commit intofacebook:mainfrom
sdaulton:export-D100256483
Closed

BONSAI: pin-and-project for constrained pruning (#5180)#5180
sdaulton wants to merge 1 commit intofacebook:mainfrom
sdaulton:export-D100256483

Conversation

@sdaulton
Copy link
Copy Markdown
Contributor

@sdaulton sdaulton commented Apr 17, 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

@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 17, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 17, 2026

@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
@meta-codesync meta-codesync Bot changed the title BONSAI: pin-and-project for constrained pruning BONSAI: pin-and-project for constrained pruning (#5180) Apr 17, 2026
@sdaulton sdaulton force-pushed the export-D100256483 branch from 6feb7a2 to 541eed7 Compare April 17, 2026 20:12
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from 541eed7 to f00e644 Compare April 17, 2026 20:40
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from f00e644 to b91c190 Compare April 17, 2026 22:36
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 96.05263% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.38%. Comparing base (75c0ed4) to head (4b2b441).

Files with missing lines Patch % Lines
ax/generators/torch/botorch_modular/acquisition.py 92.68% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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
@sdaulton sdaulton force-pushed the export-D100256483 branch from b91c190 to ade1397 Compare April 20, 2026 16:45
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from ade1397 to 2530a77 Compare April 30, 2026 17:59
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from 2530a77 to 0686264 Compare May 1, 2026 21:14
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from 0686264 to 63e3344 Compare May 5, 2026 16:39
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 sdaulton force-pushed the export-D100256483 branch from 63e3344 to f244ef2 Compare May 5, 2026 16:41
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 sdaulton force-pushed the export-D100256483 branch from f244ef2 to 51fec6e Compare May 5, 2026 16:44
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from 51fec6e to f55a264 Compare May 6, 2026 14:19
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from f55a264 to 4150bb8 Compare May 6, 2026 18:51
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from 4150bb8 to ea4c20e Compare May 7, 2026 15:29
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
@sdaulton sdaulton force-pushed the export-D100256483 branch from ea4c20e to 4b2b441 Compare May 8, 2026 16:24
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
@meta-codesync meta-codesync Bot closed this in cd36879 May 8, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 8, 2026

This pull request has been merged in cd36879.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants