Fix analysis/plotly and ax/plot for scalarized objectives/constraints#5068
Closed
saitcakmak wants to merge 1 commit intofacebook:mainfrom
Closed
Fix analysis/plotly and ax/plot for scalarized objectives/constraints#5068saitcakmak wants to merge 1 commit intofacebook:mainfrom
saitcakmak wants to merge 1 commit intofacebook:mainfrom
Conversation
Summary: - `ObjectivePFeasibleFrontierPlot`: Add scalarized guard in `validate_applicable_state` and `compute` since `metric_names[0]` and `.minimize` are semantically wrong for scalarized objectives. - Fix scalarized outcome constraint guard: change `isinstance(oc, ScalarizedOutcomeConstraint)` to `len(oc.metric_names) > 1` to catch expression-based scalarized constraints (not just the deprecated class). - `_maybe_get_default_minimize_single_metric`: Change `if optimization_config.is_moo_problem:` to `if not objective.is_single_objective:` to cover scalarized objectives using the same `metric_weights` logic. Reviewed By: lena-kashtelyan Differential Revision: D97123687
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97123687. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5068 +/- ##
=======================================
Coverage 96.29% 96.30%
=======================================
Files 613 613
Lines 67232 67238 +6
=======================================
+ Hits 64742 64752 +10
+ Misses 2490 2486 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in 9d15a15. |
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:
ObjectivePFeasibleFrontierPlot: Add scalarized guard invalidate_applicable_stateandcomputesincemetric_names[0]and.minimizeare semantically wrong for scalarized objectives.isinstance(oc, ScalarizedOutcomeConstraint)tolen(oc.metric_names) > 1to catch expression-based scalarizedconstraints (not just the deprecated class).
_maybe_get_default_minimize_single_metric: Changeif optimization_config.is_moo_problem:toif not objective.is_single_objective:to cover scalarized objectivesusing the same
metric_weightslogic.Reviewed By: lena-kashtelyan
Differential Revision: D97123687