Cycle: skip the scenarios whose definition turns off batch_estimates

This commit is contained in:
Roberto Treviño Cervantes
2026-11-23 00:14:14 -06:00
parent bd8c7aa55a
commit 5831fcd9d9
+4 -2
View File
@@ -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