-
Notifications
You must be signed in to change notification settings - Fork 358
Support BOPE experiments in get_trace with preference model utilities #4792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shrutipatel31
wants to merge
2
commits into
facebook:main
Choose a base branch
from
shrutipatel31:export-D91073267
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+509
−6
Conversation
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
|
@shrutipatel31 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91073267. |
shrutipatel31
added a commit
to shrutipatel31/Ax
that referenced
this pull request
Jan 21, 2026
…facebook#4792) Summary: This diff updates the `get_trace` function in `ax/service/utils/best_point.py` to support preference learning (BOPE) experiments with `PreferenceOptimizationConfig`. When a BOPE experiment has an associated PE_EXPERIMENT auxiliary experiment with preference data, `get_trace` now: 1. Fits a PairwiseGP preference model to the PE_EXPERIMENT data 2. Uses the learned preference model to predict utility values for each arm's metric values 3. Returns a trace based on predicted utilities If the PE_EXPERIMENT is missing or has no data, the function gracefully falls back to standard hypervolume computation for multi-objective optimization. Adds `_compute_utility_from_preference_model()` helper function and corresponding unit tests. Differential Revision: D91073267
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4792 +/- ##
==========================================
+ Coverage 96.71% 96.74% +0.02%
==========================================
Files 586 587 +1
Lines 61307 61444 +137
==========================================
+ Hits 59295 59442 +147
+ Misses 2012 2002 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
shrutipatel31
added a commit
to shrutipatel31/Ax
that referenced
this pull request
Jan 22, 2026
…facebook#4792) Summary: This diff updates the `get_trace` function in `ax/service/utils/best_point.py` to support preference learning (BOPE) experiments with `PreferenceOptimizationConfig`. When a BOPE experiment has an associated PE_EXPERIMENT auxiliary experiment with preference data, `get_trace` now: 1. Fits a PairwiseGP preference model to the PE_EXPERIMENT data 2. Uses the learned preference model to predict utility values for each arm's metric values 3. Returns a trace based on predicted utilities Adds `_compute_utility_from_preference_model()` helper function and corresponding unit tests. Differential Revision: D91073267
shrutipatel31
added a commit
to shrutipatel31/Ax
that referenced
this pull request
Jan 22, 2026
…facebook#4792) Summary: This diff updates the `get_trace` function in `ax/service/utils/best_point.py` to support preference learning (BOPE) experiments with `PreferenceOptimizationConfig`. When a BOPE experiment has an associated PE_EXPERIMENT auxiliary experiment with preference data, `get_trace` now: 1. Fits a PairwiseGP preference model to the PE_EXPERIMENT data 2. Uses the learned preference model to predict utility values for each arm's metric values 3. Returns a trace based on predicted utilities Adds `_compute_utility_from_preference_model()` helper function and corresponding unit tests. Differential Revision: D91073267
00527d5 to
d931c30
Compare
shrutipatel31
added a commit
to shrutipatel31/Ax
that referenced
this pull request
Jan 22, 2026
…facebook#4792) Summary: This diff updates the `get_trace` function in `ax/service/utils/best_point.py` to support preference learning (BOPE) experiments with `PreferenceOptimizationConfig`. When a BOPE experiment has an associated PE_EXPERIMENT auxiliary experiment with preference data, `get_trace` now: 1. Fits a PairwiseGP preference model to the PE_EXPERIMENT data 2. Uses the learned preference model to predict utility values for each arm's metric values 3. Returns a trace based on predicted utilities Adds `_compute_utility_from_preference_model()` helper function and corresponding unit tests. Differential Revision: D91073267
d931c30 to
cbc0e17
Compare
shrutipatel31
added a commit
to shrutipatel31/Ax
that referenced
this pull request
Jan 22, 2026
…facebook#4792) Summary: This diff updates the `get_trace` function in `ax/service/utils/best_point.py` to support preference learning (BOPE) experiments with `PreferenceOptimizationConfig`. When a BOPE experiment has an associated PE_EXPERIMENT auxiliary experiment with preference data, `get_trace` now: 1. Fits a PairwiseGP preference model to the PE_EXPERIMENT data 2. Uses the learned preference model to predict utility values for each arm's metric values 3. Returns a trace based on predicted utilities Adds `_compute_utility_from_preference_model()` helper function and corresponding unit tests. Differential Revision: D91073267
…ok#4553) Summary: This diff prepares `get_preference_adapter()` and `PreferenceAdapter` for upcoming utility computation changes in `get_trace()` for *BOPE* experiments. **Problem**: The subsequent diff will call `get_preference_adapter()` from `get_trace()` to compute utility-based traces for *BOPE* experiments. Without these guards, the following issues would occur: *Empty data crashes*: If `get_trace()` is called on a *BOPE* experiment before any preference comparisons are collected, `get_preference_adapter()` would attempt to fit a *PairwiseGP* model on empty data, causing cryptic model fitting errors. *Early iteration failures*: During early *BOPE* experiment iterations (before users provide preference feedback), `PreferenceAdapter.gen()` would fail when trying to update the preference model with no data. **Changes**: - `get_preference_adapter()` now raises `DataRequiredError` with a clear message when preference data is empty. - `PreferenceAdapter.gen()` skips preference model updates when `pe_data.df` is empty, allowing early iterations to proceed. - Adds `fit_tracking_metrics`=False to ensure the adapter only fits the *PairwiseGP* on preference labels (*PAIRWISE_PREFERENCE_QUERY*). Without this, the adapter would also try to fit surrogate models for the outcome metrics (e.g., m1, m2) which exist in the *PE* experiment's search space as parameters but should not be modeled as outcomes. This requires `optimization_config` to specify which metrics to use. - Registers the preference metric on the experiment if not already present, which is needed when *PE* experiments are loaded from storage without the metric registered. Differential Revision: D87347126
…facebook#4792) Summary: This diff updates the `get_trace` function in `ax/service/utils/best_point.py` to support preference learning (BOPE) experiments with `PreferenceOptimizationConfig`. When a BOPE experiment has an associated PE_EXPERIMENT auxiliary experiment with preference data, `get_trace` now: 1. Fits a PairwiseGP preference model to the PE_EXPERIMENT data 2. Uses the learned preference model to predict utility values for each arm's metric values 3. Returns a trace based on predicted utilities Adds `_compute_utility_from_preference_model()` helper function and corresponding unit tests. Differential Revision: D91073267
cbc0e17 to
c4e22e0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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:
This diff updates the
get_tracefunction inax/service/utils/best_point.pyto support preference learning (BOPE) experiments withPreferenceOptimizationConfig.When a BOPE experiment has an associated PE_EXPERIMENT auxiliary experiment with preference data,
get_tracenow:If the PE_EXPERIMENT is missing or has no data, the function gracefully falls back to standard hypervolume computation for multi-objective optimization.
Adds
_compute_utility_from_preference_model()helper function and corresponding unit tests.Differential Revision: D91073267