Skip to content

Consolidate _ecce_pvalue_from_sigma_vectorized and ecce_pvalue_from_sigma (#240)#240

Open
TaXxER wants to merge 1 commit intomainfrom
export-D96753041
Open

Consolidate _ecce_pvalue_from_sigma_vectorized and ecce_pvalue_from_sigma (#240)#240
TaXxER wants to merge 1 commit intomainfrom
export-D96753041

Conversation

@TaXxER
Copy link
Contributor

@TaXxER TaXxER commented Mar 16, 2026

Summary:

Add overload type signatures to _ecce_cdf and ecce_pvalue_from_sigma to enable proper type narrowing: scalar input returns scalar, array input returns array. This resolves Pyre type errors at the three callsites (ecce_pvalue, segments_ecce_pvalue, mce_pvalue) by allowing Pyre to infer the correct return type based on the input type. Consolidate the vectorized implementation into the main functions, removing the separate _ecce_pvalue_from_sigma_vectorized helper.

Differential Revision: D96753041

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 16, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 16, 2026

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

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.87%. Comparing base (76f0707) to head (d01c910).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
+ Coverage   95.81%   95.87%   +0.06%     
==========================================
  Files           9        9              
  Lines        1887     1892       +5     
==========================================
+ Hits         1808     1814       +6     
+ Misses         79       78       -1     
Flag Coverage Δ
unittests 95.87% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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 changed the title Unify _ecce_cdf and ecce_pvalue_from_sigma for scalar+array inputs Add @overload signatures to ECCE functions for Pyre type safety Mar 16, 2026
…igma (#240)

Summary:

Add `overload` type signatures to `_ecce_cdf` and `ecce_pvalue_from_sigma` to enable proper type narrowing: scalar input returns scalar, array input returns array. This resolves Pyre type errors at the three callsites (`ecce_pvalue`, `segments_ecce_pvalue`, `mce_pvalue`) by allowing Pyre to infer the correct return type based on the input type. Consolidate the vectorized implementation into the main functions, removing the separate `_ecce_pvalue_from_sigma_vectorized` helper.

Differential Revision: D96753041
@meta-codesync meta-codesync bot changed the title Add @overload signatures to ECCE functions for Pyre type safety Consolidate _ecce_pvalue_from_sigma_vectorized and ecce_pvalue_from_sigma (#240) Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant