Skip to content

Handle multi-metric OutcomeConstraint in adapter transforms and utils - #5334

Closed
saitcakmak wants to merge 1 commit into
meta:mainfrom
saitcakmak:export-D136125780
Closed

saitcakmak wants to merge 1 commit into
meta:mainfrom
saitcakmak:export-D136125780

Conversation

@saitcakmak

Copy link
Copy Markdown
Contributor

Summary:

What Changed

  • adapter_utils.feasible_hypervolume: evaluate weighted sums across all (sig, weight) in oc.metric_weights instead of reading only oc.metric_signatures[0].
  • LogY: guard multi-metric outcome_constraints and objective_thresholds with c.is_scalarized (raising if any component metric is log-transformed and passing through otherwise, matching PowerTransformY).
  • ObjectiveAsConstraint: emit plain expression-backed OutcomeConstraint for scalarized objectives, strip only the constraint it added by object identity (with single-match fallback) instead of dropping all ScalarizedOutcomeConstraint instances, and evaluate multi-metric constraints in _is_point_feasible.

Differential Revision: D136125780

Summary:
## What Changed
- `adapter_utils.feasible_hypervolume`: evaluate weighted sums across all `(sig, weight)` in `oc.metric_weights` instead of reading only `oc.metric_signatures[0]`.
- `LogY`: guard multi-metric `outcome_constraints` and `objective_thresholds` with `c.is_scalarized` (raising if any component metric is log-transformed and passing through otherwise, matching `PowerTransformY`).
- `ObjectiveAsConstraint`: emit plain expression-backed `OutcomeConstraint` for scalarized objectives, strip only the constraint it added by object identity (with single-match fallback) instead of dropping all `ScalarizedOutcomeConstraint` instances, and evaluate multi-metric constraints in `_is_point_feasible`.

Differential Revision: D136125780
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 4, 2026
@meta-codesync

meta-codesync Bot commented Dec 4, 2026

Copy link
Copy Markdown

@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D136125780.

@meta-codesync

meta-codesync Bot commented Dec 4, 2026

Copy link
Copy Markdown

This pull request has been merged in 181c4f7.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.62%. Comparing base (49e9412) to head (a96d1e7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ax/adapter/transforms/objective_as_constraint.py 86.66% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5334      +/-   ##
==========================================
- Coverage   96.62%   96.62%   -0.01%     
==========================================
  Files         621      621              
  Lines       71390    71460      +70     
==========================================
+ Hits        68981    69048      +67     
- Misses       2409     2412       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants