Skip to content

Auto-register extraneous metrics as tracking metrics in Client.attach_data#5135

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

Auto-register extraneous metrics as tracking metrics in Client.attach_data#5135
saitcakmak wants to merge 1 commit into
facebook:mainfrom
saitcakmak:export-D99386924

Conversation

@saitcakmak
Copy link
Copy Markdown
Contributor

Summary:
The Client.attach_data docstring claims unexpected metric values will be added as tracking metrics, but the code actually raises a UserInputError. This diff fixes the implementation to match the docstring: extraneous metrics in raw_data are now auto-registered via configure_tracking_metrics before the data is passed downstream.

This also applies to Client.complete_trial since it delegates to attach_data.

Differential Revision: D99386924

…_data

Summary:
The `Client.attach_data` docstring claims unexpected metric values will be added as tracking metrics, but the code actually raises a `UserInputError`. This diff fixes the implementation to match the docstring: extraneous metrics in `raw_data` are now auto-registered via `configure_tracking_metrics` before the data is passed downstream.

This also applies to `Client.complete_trial` since it delegates to `attach_data`.

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

meta-codesync Bot commented Apr 3, 2026

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

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.40%. Comparing base (c8a547d) to head (da3e21b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5135      +/-   ##
==========================================
- Coverage   96.40%   96.40%   -0.01%     
==========================================
  Files         613      613              
  Lines       68187    68190       +3     
==========================================
+ Hits        65737    65739       +2     
- Misses       2450     2451       +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 Apr 3, 2026

This pull request has been merged in 227243c.

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