From 5831fcd9d92cd392cf01431fe83bf81f7d061d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Trevi=C3=B1o=20Cervantes?= Date: Mon, 23 Nov 2026 00:14:14 -0600 Subject: [PATCH] Cycle: skip the scenarios whose definition turns off batch_estimates --- webapi/orchestration/estimators.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapi/orchestration/estimators.py b/webapi/orchestration/estimators.py index 94c4ef2..11c59f2 100644 --- a/webapi/orchestration/estimators.py +++ b/webapi/orchestration/estimators.py @@ -63,8 +63,8 @@ class ScenarioEstimator: def live_estimators(domain: str) -> dict[str, list[ScenarioEstimator]]: """The estimators of a domain's cohorts, by cohort url: one per scenario with a version in production in the registry, so promoting or retiring a version is what adds or drops it. A registered name with no scenario - definition in `models` is skipped. Empty where none is in production, the same as no estimator being - configured: `estimate` then does nothing.""" + definition in `models`, or one whose definition turns off `batch_estimates`, is skipped. Empty where none is in + production, the same as no estimator being configured: `estimate` then does nothing.""" from models.dags.training import Scenario from models.io.registry import registry @@ -74,5 +74,7 @@ def live_estimators(domain: str) -> dict[str, list[ScenarioEstimator]]: scenario = Scenario.load(domain, name) except LookupError: continue + if not scenario.batch_estimates: + continue found.setdefault(scenario.cohort, []).append(ScenarioEstimator(domain, name)) return found