Skip to content

Allow DiagnosticAnalysis with missing opt config metrics#5159

Closed
bletham wants to merge 1 commit into
facebook:mainfrom
bletham:export-D100103284
Closed

Allow DiagnosticAnalysis with missing opt config metrics#5159
bletham wants to merge 1 commit into
facebook:mainfrom
bletham:export-D100103284

Conversation

@bletham
Copy link
Copy Markdown
Contributor

@bletham bletham commented Apr 9, 2026

Summary:
Filter DiagnosticAnalysis metrics to only those present in the adapter's optimization config, gracefully handling cases where the adapter cannot be extracted. This prevents errors when the experiment has metrics not included in the optimization configuration.

The commit adds a try/except block in DiagnosticAnalysis that uses extract_relevant_adapter to identify which metrics are actually in the optimization config, filtering out any that aren't. If the adapter can't be extracted, it silently continues with the original metric list.

Differential Revision: D100103284

Summary:
Filter DiagnosticAnalysis metrics to only those present in the adapter's optimization config, gracefully handling cases where the adapter cannot be extracted. This prevents errors when the experiment has metrics not included in the optimization configuration.

The commit adds a try/except block in DiagnosticAnalysis that uses extract_relevant_adapter to identify which metrics are actually in the optimization config, filtering out any that aren't. If the adapter can't be extracted, it silently continues with the original metric list.

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

meta-codesync Bot commented Apr 9, 2026

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

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.40%. Comparing base (7292287) to head (801c873).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5159   +/-   ##
=======================================
  Coverage   96.39%   96.40%           
=======================================
  Files         614      614           
  Lines       68621    68644   +23     
=======================================
+ Hits        66150    66173   +23     
  Misses       2471     2471           

☔ 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 meta-codesync Bot closed this in 733320e Apr 9, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 9, 2026

This pull request has been merged in 733320e.

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