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