Adapter.gen: store untransformed optimization config on GeneratorRun (#5228)#5228
Closed
eonofrey wants to merge 1 commit into
Closed
Adapter.gen: store untransformed optimization config on GeneratorRun (#5228)#5228eonofrey wants to merge 1 commit into
eonofrey wants to merge 1 commit into
Conversation
|
@eonofrey has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107967197. |
…acebook#5228) Summary: ObjectiveAsConstraint adds a constraint on the objective metric when no observed points are feasible, producing a single-objective OptimizationConfig that breaks its own invariant (constructible only because the transform mutates _outcome_constraints directly). Adapter.gen then re-cloned that config via clone_with_args to store on the GeneratorRun, and validation raised ValueError: Cannot constrain on objective metric.. Fix: store the untransformed, user-space config on the GeneratorRun (like orig_search_space already is) — it's the correct thing to record and is always valid. Surfaced in SPORE/QRT notebooks when swapping objective/constraint metrics, but really triggers for any config whose constraint excludes all observed points. {F1990966498} Differential Revision: D107967197
3994e45 to
f790c56
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5228 +/- ##
=======================================
Coverage 96.56% 96.56%
=======================================
Files 619 619
Lines 70143 70160 +17
=======================================
+ Hits 67731 67748 +17
Misses 2412 2412 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in a3a17f2. |
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:
ObjectiveAsConstraint adds a constraint on the objective metric when no observed points are feasible, producing a single-objective OptimizationConfig that breaks its own invariant
(constructible only because the transform mutates _outcome_constraints directly). Adapter.gen then re-cloned that config via clone_with_args to store on the GeneratorRun, and validation raised ValueError: Cannot constrain on objective metric..
Fix: store the untransformed, user-space config on the GeneratorRun (like orig_search_space already is) — it's the correct thing to record and is always valid.
Surfaced in SPORE/QRT notebooks when swapping objective/constraint metrics, but really triggers for any config whose constraint excludes all observed points.
{F1990966498}
Differential Revision: D107967197