Skip to content

Commit a553e76

Browse files
atodorov-storpoolrsmontero
authored andcommitted
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. (cherry picked from commit 60dfce2026dec29904f01b5b88a7174c79dbbf53)
1 parent 19893a1 commit a553e76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/schedm_mad/remotes/one_drs/lib/optimizer_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ def get_system_ds(self, host_id):
972972
def _apply_predictive_adjustment(
973973
self, current: float, forecast: float = None
974974
) -> float:
975-
predictive = self.config.get("predictive", 0)
975+
predictive = self.config.get("PREDICTIVE", 0)
976976
if predictive > 0 and forecast > 0:
977977
return current * (1 - predictive) + forecast * predictive
978978
return current

0 commit comments

Comments
 (0)