From fbcb0ef7e9002d8850acadc0d0b7e795b19ed8ba Mon Sep 17 00:00:00 2001 From: Mizev Andrew <150728785+carpalsgrabby@users.noreply.github.com> Date: Tue, 25 Nov 2025 09:53:54 +0100 Subject: [PATCH] Add metric to the error message when a metric is missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Right now metric_value silently returns inf on missing metrics. That’s fine, but a tiny debug print helps. --- choose_best_layout.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/choose_best_layout.py b/choose_best_layout.py index 8ac4dc2..9cbf588 100644 --- a/choose_best_layout.py +++ b/choose_best_layout.py @@ -102,10 +102,12 @@ def metric_value(data: Dict[str, Any], metric: str) -> float: val = data.get(metric) if val is None: # treat missing metrics as infinite (worst) + # (could also log here if you want more visibility) return float("inf") return float(val) + def main() -> None: args = parse_args()