From 6ca8785d562f6c731e3ce2578cbe3c178ea76466 Mon Sep 17 00:00:00 2001 From: Anton Todorov Date: Fri, 10 Jul 2026 15:15:17 +0300 Subject: [PATCH] B #7915: Fix PREDICTIVE config lookup in one_drs read the lowercase "predictive" config key while the config stores PREDICTIVE, so the predictive factor was always 0 and forecasts were never blended in. Also guard against a None value coming from a cluster ONE_DRS template without PREDICTIVE defined. --- src/schedm_mad/remotes/one_drs/lib/optimizer_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schedm_mad/remotes/one_drs/lib/optimizer_parser.py b/src/schedm_mad/remotes/one_drs/lib/optimizer_parser.py index cbd7c33a6a..aa07f09a4b 100644 --- a/src/schedm_mad/remotes/one_drs/lib/optimizer_parser.py +++ b/src/schedm_mad/remotes/one_drs/lib/optimizer_parser.py @@ -972,7 +972,7 @@ def get_system_ds(self, host_id): def _apply_predictive_adjustment( self, current: float, forecast: float = None ) -> float: - predictive = self.config.get("predictive", 0) + predictive = self.config.get("PREDICTIVE") or 0 if predictive > 0 and forecast > 0: return current * (1 - predictive) + forecast * predictive return current