Repository navigation
Normalize legacy scalarized constraints at construction - #5336
Open
saitcakmak wants to merge 2 commits into
Open
saitcakmak wants to merge 2 commits into
saitcakmak wants to merge 2 commits into
Conversation
…, and stopping (meta#5335) Summary: ## What Changed - `service/utils/best_point.py` (`is_row_feasible`): evaluate multi-metric constraints per arm/trial using combined weighted mean and independent-metric SEM, and check missingness across all `oc.metric_names`. - `global_stopping/strategies/improvement.py`: evaluate weighted sum across all constraint components in `constraint_is_satisfied`. - `api/utils/instantiation/from_string.py` and `plot/pareto_utils.py`: check all `metric_names` in an `OutcomeConstraint` against objective metrics. - `core/experiment.py` (`metric_config_summary_df`) and `orchestration/orchestrator.py`: collect and format all component metrics for scalarized constraints. ___ landed-with-radar-review Differential Revision: D136125781
Summary: ## What Changed Make the deprecated `ScalarizedOutcomeConstraint(...)` constructor a factory returning a plain, expression-backed `OutcomeConstraint`, now that JSON serialization (D135145413, landed), SQL storage (D134526278, landed), and all Ax callers (D135150118..D136125784) handle multi-metric `OutcomeConstraint`s natively. - Raise `UserInputError` when `metrics` is empty (with unit test coverage). - Remove `ScalarizedOutcomeConstraint` from `CORE_ENCODER_REGISTRY` and SQL encoder/decoder, while keeping legacy JSON tags and legacy SQL rows readable as `OutcomeConstraint`. - Update remaining unit tests and stubs expecting the deprecated subclass. This intentionally stops exposing `ScalarizedOutcomeConstraint` as a class. Callers using `isinstance`, subclassing, or `.weights` must use `OutcomeConstraint`, `is_scalarized`, and `metric_weights`. No SQL schema change. Differential Revision: D134595196
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D134595196. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5336 +/- ##
==========================================
- Coverage 96.62% 96.62% -0.01%
==========================================
Files 621 621
Lines 71460 71518 +58
==========================================
+ Hits 69048 69104 +56
- Misses 2412 2414 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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:
What Changed
Make the deprecated
ScalarizedOutcomeConstraint(...)constructor a factory returning a plain, expression-backedOutcomeConstraint, now that JSON serialization (D135145413, landed), SQL storage (D134526278, landed), and all Ax callers (D135150118..D136125784) handle multi-metricOutcomeConstraints natively.UserInputErrorwhenmetricsis empty (with unit test coverage).ScalarizedOutcomeConstraintfromCORE_ENCODER_REGISTRYand SQL encoder/decoder, while keeping legacy JSON tags and legacy SQL rows readable asOutcomeConstraint.This intentionally stops exposing
ScalarizedOutcomeConstraintas a class. Callers usingisinstance, subclassing, or.weightsmust useOutcomeConstraint,is_scalarized, andmetric_weights. No SQL schema change.Differential Revision: D134595196