Skip to content

Commit f426512

Browse files
shrutipatel31meta-codesync[bot]
authored andcommitted
Add remediation steps to PredictableMetrics healthcheck (#5083)
Summary: Pull Request resolved: #5083 When some metrics are unpredictable, add concrete investigation steps Reviewed By: bernardbeckerman Differential Revision: D97189120 fbshipit-source-id: ff5d15bc87131283183ab2aa8fab1e03ca70ae24
1 parent 47c7bc3 commit f426512

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

ax/analysis/healthcheck/predictable_metrics.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,26 @@
2929
"be reliably predicted by the model. "
3030
)
3131
DEFAULT_MODEL_FIT_THRESHOLD = 0.1
32+
INVESTIGATION_STEPS: str = (
33+
"\n\n**Suggested next steps:**\n"
34+
"- If the metric is noisy, increase replications per trial "
35+
"so the averaged observation is more stable and the model "
36+
"can detect the underlying signal.\n"
37+
"- Run more trials so the model has enough data to learn "
38+
"the parameter-metric relationship (leave-one-out cross-"
39+
"validation needs sufficient training points).\n"
40+
"- Verify that the tuned parameters actually influence this "
41+
"metric. If the metric does not depend on any parameter, "
42+
"the model cannot learn a relationship and predictions will "
43+
"be no better than the mean.\n"
44+
"- Check that the metric has sufficient variation across "
45+
"trials. If metric values are nearly constant, the model "
46+
"fit score will be very low or negative.\n"
47+
"- Check for missing values, outliers, or bugs in the "
48+
"metric implementation that could corrupt model training.\n"
49+
"- If this metric is not critical, removing it from the "
50+
"optimization config may simplify the problem."
51+
)
3252

3353

3454
@final
@@ -156,6 +176,7 @@ def compute(
156176

157177
if warning_message is not None:
158178
subtitle = HEALTHCHECK_DESCRIPTION + warning_message
179+
subtitle += INVESTIGATION_STEPS
159180
if self.guidance_message is not None:
160181
subtitle += "\n\n" + self.guidance_message
161182
return create_healthcheck_analysis_card(

0 commit comments

Comments
 (0)