Include SQ arm in DerivedMetric output when relativize_inputs=True (#5029)#5029
Closed
ItsMrLin wants to merge 1 commit into
Closed
Include SQ arm in DerivedMetric output when relativize_inputs=True (#5029)#5029ItsMrLin wants to merge 1 commit into
ItsMrLin wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5029 +/- ##
==========================================
- Coverage 96.84% 96.84% -0.01%
==========================================
Files 605 605
Lines 65292 65313 +21
==========================================
+ Hits 63233 63252 +19
- Misses 2059 2061 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 14, 2026
…acebook#5029) Summary: When `relativize_inputs=True`, the status quo arm was previously excluded from the output because its relativized values are trivially zero. This is incorrect for non-linear expressions: `exp(0) = 1`, not 0. Instead of skipping the SQ arm, construct a DataFrame with zero-valued inputs for all input metrics and let `_compute_derived_values` evaluate the expression on them. This produces correct SQ output for any expression (e.g., `a + b = 0`, `exp(a) = 1`). Differential Revision: D96558255
441e580 to
e639c74
Compare
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 14, 2026
…acebook#5029) Summary: Pull Request resolved: facebook#5029 When `relativize_inputs=True`, the status quo arm was previously excluded from the output because its relativized values are trivially zero. This is incorrect for non-linear expressions: `exp(0) = 1`, not 0. Instead of skipping the SQ arm, construct a DataFrame with zero-valued inputs for all input metrics and let `_compute_derived_values` evaluate the expression on them. This produces correct SQ output for any expression (e.g., `a + b = 0`, `exp(a) = 1`). Differential Revision: D96558255
e639c74 to
3779524
Compare
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 15, 2026
…acebook#5029) Summary: When `relativize_inputs=True`, the status quo arm was previously excluded from the output because its relativized values are trivially zero. This is incorrect for non-linear expressions: `exp(0) = 1`, not 0. Instead of skipping the SQ arm, construct a DataFrame with zero-valued inputs for all input metrics and let `_compute_derived_values` evaluate the expression on them. This produces correct SQ output for any expression (e.g., `a + b = 0`, `exp(a) = 1`). Reviewed By: Balandat Differential Revision: D96558255
3779524 to
1255e58
Compare
…acebook#5029) Summary: Pull Request resolved: facebook#5029 When `relativize_inputs=True`, the status quo arm was previously excluded from the output because its relativized values are trivially zero. This is incorrect for non-linear expressions: `exp(0) = 1`, not 0. Instead of skipping the SQ arm, construct a DataFrame with zero-valued inputs for all input metrics and let `_compute_derived_values` evaluate the expression on them. This produces correct SQ output for any expression (e.g., `a + b = 0`, `exp(a) = 1`). Reviewed By: Balandat Differential Revision: D96558255
1255e58 to
57808d0
Compare
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 15, 2026
…acebook#5029) Summary: When `relativize_inputs=True`, the status quo arm was previously excluded from the output because its relativized values are trivially zero. This is incorrect for non-linear expressions: `exp(0) = 1`, not 0. Instead of skipping the SQ arm, construct a DataFrame with zero-valued inputs for all input metrics and let `_compute_derived_values` evaluate the expression on them. This produces correct SQ output for any expression (e.g., `a + b = 0`, `exp(a) = 1`). Reviewed By: Balandat Differential Revision: D96558255
ItsMrLin
added a commit
to ItsMrLin/Ax
that referenced
this pull request
Mar 15, 2026
…acebook#5029) Summary: When `relativize_inputs=True`, the status quo arm was previously excluded from the output because its relativized values are trivially zero. This is incorrect for non-linear expressions: `exp(0) = 1`, not 0. Instead of skipping the SQ arm, construct a DataFrame with zero-valued inputs for all input metrics and let `_compute_derived_values` evaluate the expression on them. This produces correct SQ output for any expression (e.g., `a + b = 0`, `exp(a) = 1`). Reviewed By: Balandat Differential Revision: D96558255
|
This pull request has been merged in 4c1ed83. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
When
relativize_inputs=True, the status quo arm was previously excludedfrom the output because its relativized values are trivially zero. This
is incorrect for non-linear expressions:
exp(0) = 1, not 0.Instead of skipping the SQ arm, construct a DataFrame with zero-valued
inputs for all input metrics and let
_compute_derived_valuesevaluatethe expression on them. This produces correct SQ output for any
expression (e.g.,
a + b = 0,exp(a) = 1).Reviewed By: Balandat
Differential Revision: D96558255