Skip to content

Add in-sample candidate generation support for MBG#4909

Closed
ItsMrLin wants to merge 1 commit intofacebook:mainfrom
ItsMrLin:export-D92124823
Closed

Add in-sample candidate generation support for MBG#4909
ItsMrLin wants to merge 1 commit intofacebook:mainfrom
ItsMrLin:export-D92124823

Conversation

@ItsMrLin
Copy link
Contributor

Summary:
Enable in-sample candidate generation in the Modular BoTorch Generator (MBG), allowing optimization to select from existing training data rather than optimizing over the full search space. This is achieved via adding 2 optional kwargs in Acquisition.optimize: candidate_set and sampling_strategy

This hits 4 birds with 1 stone - the same mechanism may support:

  • Model-based/Contextual bandits
  • Bake-off/Best arm selection
  • in-sample preference learning (in-sample PBO and BOPE preference game)
  • LILO (for LLM to label observed points)

Supports multiple selection methods including GP Thompson Sampling, Top-Two Thompson Sampling (TTTS), greedy acquisition (qSimpleRegret), q-batched acquisition (qLogNEI), random selection, and Boltzmann sampling via model_gen_options.

This is partially inspired by the Support for SamplingStrategy design doc but with a wider range of applications in mind.

Reviewed By: Balandat

Differential Revision: D92124823

Summary:
Enable in-sample candidate generation in the Modular BoTorch Generator (MBG), allowing optimization to select from existing training data rather than optimizing over the full search space. This is achieved via adding 2 optional kwargs in `Acquisition.optimize`: `candidate_set` and `sampling_strategy`

This hits 4 birds with 1 stone - the same mechanism may support:
- Model-based/Contextual bandits
- Bake-off/Best arm selection
- in-sample preference learning (in-sample PBO and BOPE preference game)
- LILO (for LLM to label observed points)

Supports multiple selection methods including GP Thompson Sampling, Top-Two Thompson Sampling (TTTS), greedy acquisition (qSimpleRegret), q-batched acquisition (qLogNEI), random selection, and Boltzmann sampling via `model_gen_options`.

This is partially inspired by the [Support for SamplingStrategy](https://docs.google.com/document/d/19mLXg88bjA_NzYCz59KmY7Zq10XnqSD4HWkFkNbhYR4/edit?usp=sharing) design doc but with a wider range of applications in mind.

Reviewed By: Balandat

Differential Revision: D92124823
@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 13, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 13, 2026

@ItsMrLin has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92124823.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 99.34641% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.78%. Comparing base (44c7c38) to head (70c4f6a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ax/generators/torch/botorch_modular/acquisition.py 96.77% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #4909    +/-   ##
========================================
  Coverage   96.78%   96.78%            
========================================
  Files         593      593            
  Lines       62303    62456   +153     
========================================
+ Hits        60297    60450   +153     
  Misses       2006     2006            

☔ 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.

@meta-codesync
Copy link

meta-codesync bot commented Feb 14, 2026

This pull request has been merged in 6d637df.

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.

3 participants