|
29 | 29 | "be reliably predicted by the model. " |
30 | 30 | ) |
31 | 31 | 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 | +) |
32 | 52 |
|
33 | 53 |
|
34 | 54 | @final |
@@ -156,6 +176,7 @@ def compute( |
156 | 176 |
|
157 | 177 | if warning_message is not None: |
158 | 178 | subtitle = HEALTHCHECK_DESCRIPTION + warning_message |
| 179 | + subtitle += INVESTIGATION_STEPS |
159 | 180 | if self.guidance_message is not None: |
160 | 181 | subtitle += "\n\n" + self.guidance_message |
161 | 182 | return create_healthcheck_analysis_card( |
|
0 commit comments