From 18ed0eb132830cc2d28d6420002a3f85d336d6da Mon Sep 17 00:00:00 2001 From: Bernie Beckerman Date: Thu, 9 May 2024 16:37:19 -0700 Subject: [PATCH] Add warning when metric is skipped because it's not on the experiment (#2449) Summary: See discussion on D57165887 and D56634321. Differential Revision: D57174994 --- ax/core/observation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ax/core/observation.py b/ax/core/observation.py index 255827bb986..da394d820ae 100644 --- a/ax/core/observation.py +++ b/ax/core/observation.py @@ -380,6 +380,11 @@ def _filter_data_on_status( metric_name = g # Filter out any metrics that are not on the experiment. if metric_name not in experiment.metrics: + warnings.warn( + f"Metric {metric_name} not found on {experiment}. Not attaching to " + "observation.", + stacklevel=2, + ) continue metric = experiment.metrics[metric_name] statuses_to_include_metric = (