You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skip TransformToNewSQ for metrics with near-zero status quo mean (#5076)
Summary:
Pull Request resolved: #5076
When `ExpressionDerivedMetric` is used as an objective in PTS experiments,
its status quo value is naturally zero (0% change from itself). This caused
`TransformToNewSQ.transform_experiment_data` to crash with a `ValueError`
in `relativize()` because division by zero is undefined for the delta method.
D96574758 handled missing SQ data (trials without any SQ) but not
zero-valued SQ data (SQ exists but the metric value is zero).
This diff adds guards in `TransformToNewSQ` to skip metrics where the
status quo mean is near-zero, with a warning so users know the transform
was skipped. The `relativize()` utility itself still raises on zero control
-- we only prevent calling it with zero args.
Two code paths are guarded:
- `transform_experiment_data` (vectorized/DataFrame path): checks target SQ
and source trial SQ means before calling `relativize()`.
- `_get_rel_mean_sem` (per-observation path): same guard, needed for
untransform symmetry so that predictions are not incorrectly
un-transformed for metrics that were never transformed.
Meta: this unblocks Ax experiment `ifu_rbvm_session_proxy_pts`
Reviewed By: Balandat
Differential Revision: D97357997
fbshipit-source-id: e41f2d57998cd42ca03ab1d43cadbe4615fb0be1
0 commit comments