Fix get_target_trial_index for LILO experiments (#5038)#5038
Closed
ItsMrLin wants to merge 2 commits intofacebook:mainfrom
Closed
Fix get_target_trial_index for LILO experiments (#5038)#5038ItsMrLin wants to merge 2 commits intofacebook:mainfrom
ItsMrLin wants to merge 2 commits intofacebook:mainfrom
Conversation
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 16, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of Sobol trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, add a fallback that checks metric availability against all experiment metrics (not just opt config), so Sobol trials are found even when the opt config includes the pairwise metric. Differential Revision: D96574746
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 17, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of Sobol trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, add a fallback that checks metric availability against all experiment metrics (not just opt config), so Sobol trials are found even when the opt config includes the pairwise metric. Reviewed By: Balandat Differential Revision: D96574746
6f8c609 to
e864223
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5038 +/- ##
=======================================
Coverage 96.73% 96.74%
=======================================
Files 606 606
Lines 66242 66296 +54
=======================================
+ Hits 64080 64136 +56
+ Misses 2162 2160 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1064d78 to
649afea
Compare
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 18, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 18, 2026
Summary: Pull Request resolved: facebook#5038 In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
649afea to
22f3397
Compare
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 18, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
22f3397 to
28987d9
Compare
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 18, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 18, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
28987d9 to
ee2481a
Compare
Summary: Move `LLMMessage` dict conversion from the `experiment.llm_messages` getter/setter to the storage encoders/decoders, following Ax convention that domain objects hold domain types and serialization happens at the storage boundary. **`experiment.py`**: The setter now stores `LLMMessage` objects directly in `_properties`. The getter handles both `LLMMessage` objects (new path) and plain dicts (backward compat with previously stored data). **JSON store**: No explicit changes needed — the encoder's generic dataclass fallback auto-serializes `LLMMessage` with a `__type` tag, and `LLMMessage` is already registered in `CORE_DECODER_REGISTRY`. **SQA store**: The encoder converts `LLMMessage` → dict via `dataclasses.asdict()` in the properties copy before DB write (same pattern as `pruning_target_parameterization`). The decoder converts dicts → `LLMMessage` after loading properties, in both `_init_experiment_from_sqa` and `_init_mt_experiment_from_sqa`. Reviewed By: lena-kashtelyan Differential Revision: D96434290
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
ee2481a to
7f1a99c
Compare
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 18, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 18, 2026
Summary: In LILO (LLM-In-the-Loop Optimization) experiments, the optimization config objective is `pairwise_pref_query` — a derived metric that only LILO labeling trials carry data for. `get_target_trial_index()` then selects these labeling trials (which have COMPLETE pairwise data) as the relativization reference instead of non-LILO trials (which have base metric data). The target trial's SQ then lacks base metrics, causing TransformToNewSQ and downstream model fitting to fail. Fix: 1. Exclude LILO labeling trials (`trial_type == LILO_LABELING`) from the target trial candidate set. 2. For LILO experiments, accept INCOMPLETE metric availability so that non-LILO trials (which have base-metric data but lack the pairwise preference metric) can serve as relativization references. Reviewed By: Balandat Differential Revision: D96574746
|
This pull request has been merged in 0ecc5d9. |
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:
In LILO (LLM-In-the-Loop Optimization) experiments, the optimization
config objective is
pairwise_pref_query— a derived metric that onlyLILO labeling trials carry data for.
get_target_trial_index()thenselects these labeling trials (which have COMPLETE pairwise data) as
the relativization reference instead of non-LILO trials (which have base
metric data). The target trial's SQ then lacks base metrics, causing
TransformToNewSQ and downstream model fitting to fail.
Fix:
trial_type == LILO_LABELING) fromthe target trial candidate set.
non-LILO trials (which have base-metric data but lack the pairwise
preference metric) can serve as relativization references.
Reviewed By: Balandat
Differential Revision: D96574746