Skip to content

Raise UnsupportedError for scalarized objectives in best_point_mixin and report_utils#5065

Closed
saitcakmak wants to merge 1 commit into
facebook:mainfrom
saitcakmak:export-D97123523
Closed

Raise UnsupportedError for scalarized objectives in best_point_mixin and report_utils#5065
saitcakmak wants to merge 1 commit into
facebook:mainfrom
saitcakmak:export-D97123523

Conversation

@saitcakmak
Copy link
Copy Markdown
Contributor

Summary:
Several methods in best_point_mixin.py and report_utils.py use
metric_names[0] as the objective metric and call .minimize, which is
semantically wrong for scalarized objectives (where the objective is a
combination of metrics). Add early guards raising UnsupportedError.

Affected methods:

  • _get_trace_by_progression
  • get_improvement_over_baseline
  • _get_objective_trace_plot
  • maybe_extract_baseline_comparison_values

Differential Revision: D97123523

…and report_utils

Summary:
Several methods in `best_point_mixin.py` and `report_utils.py` use
`metric_names[0]` as the objective metric and call `.minimize`, which is
semantically wrong for scalarized objectives (where the objective is a
combination of metrics). Add early guards raising `UnsupportedError`.

Affected methods:
- `_get_trace_by_progression`
- `get_improvement_over_baseline`
- `_get_objective_trace_plot`
- `maybe_extract_baseline_comparison_values`

Differential Revision: D97123523
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 18, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 18, 2026

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

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.29%. Comparing base (84838db) to head (badb436).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5065   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files         613      613           
  Lines       67152    67187   +35     
=======================================
+ Hits        64664    64700   +36     
+ Misses       2488     2487    -1     

☔ View full report in Codecov by Sentry.
📢 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.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 19, 2026

This pull request has been merged in 04c9aba.

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. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants