Skip to content

Preserve treatment SEMs for zero relative changes - #5302

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

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

Conversation

@saitcakmak

Copy link
Copy Markdown
Contributor

Summary:

What Changed

  • Keep constant-control unrelativize SEMs on the rescaled treatment value, including zero relative means.
  • Identify the real status quo by arm name so a treatment with identical statistics is not mistaken for the control in constant-control mode.
  • Restore true status-quo (0, 0) observations inside BaseRelativize._get_rel_mean_sem, preserving subclass dispatch and TransformToNewSQ absolute-scale interpretation.
  • Restrict the raw-statistics identity shortcut to forward relativization, avoiding accidental equality between relative predictions and absolute controls during inverse transforms.
  • Clarify that the utility zero-relative-mean override applies only outside constant-control mode.

Addresses review comments 1, 2, and 4. Nonconstant-control forward variance parity (comment 3) is isolated in a separate stacked change tracked by T293694908.

Based on #5301.

Differential Revision: D126108875

Summary:
## What Changed
- Keep constant-control unrelativize SEMs on the rescaled treatment value, including zero relative means.
- Identify the real status quo by arm name so a treatment with identical statistics is not mistaken for the control in constant-control mode.
- Restore true status-quo (0, 0) observations inside BaseRelativize._get_rel_mean_sem, preserving subclass dispatch and TransformToNewSQ absolute-scale interpretation.
- Restrict the raw-statistics identity shortcut to forward relativization, avoiding accidental equality between relative predictions and absolute controls during inverse transforms.
- Clarify that the utility zero-relative-mean override applies only outside constant-control mode.

Addresses review comments 1, 2, and 4. Nonconstant-control forward variance parity (comment 3) is isolated in a separate stacked change tracked by T293694908.

Based on meta#5301.

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

meta-codesync Bot commented Oct 19, 2026

Copy link
Copy Markdown

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

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.60%. Comparing base (7017487) to head (5f26309).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5302      +/-   ##
==========================================
+ Coverage   96.59%   96.60%   +0.01%     
==========================================
  Files         621      621              
  Lines       70966    71054      +88     
==========================================
+ Hits        68550    68643      +93     
+ Misses       2416     2411       -5     

☔ 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.

@meta-codesync meta-codesync Bot closed this in 34f5ff6 Oct 19, 2026
@meta-codesync meta-codesync Bot added the Merged label Oct 19, 2026
@meta-codesync

meta-codesync Bot commented Oct 19, 2026

Copy link
Copy Markdown

This pull request has been merged in 34f5ff6.

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.

[Bug]: unrelativize with control_as_constant replaces the treatment SEM when the relative change is 0

2 participants