Cycle: skip the scenarios whose definition turns off batch_estimates
This commit is contained in:
@@ -63,8 +63,8 @@ class ScenarioEstimator:
|
|||||||
def live_estimators(domain: str) -> dict[str, list[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
|
"""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
|
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
|
definition in `models`, or one whose definition turns off `batch_estimates`, is skipped. Empty where none is in
|
||||||
configured: `estimate` then does nothing."""
|
production, the same as no estimator being configured: `estimate` then does nothing."""
|
||||||
from models.dags.training import Scenario
|
from models.dags.training import Scenario
|
||||||
from models.io.registry import registry
|
from models.io.registry import registry
|
||||||
|
|
||||||
@@ -74,5 +74,7 @@ def live_estimators(domain: str) -> dict[str, list[ScenarioEstimator]]:
|
|||||||
scenario = Scenario.load(domain, name)
|
scenario = Scenario.load(domain, name)
|
||||||
except LookupError:
|
except LookupError:
|
||||||
continue
|
continue
|
||||||
|
if not scenario.batch_estimates:
|
||||||
|
continue
|
||||||
found.setdefault(scenario.cohort, []).append(ScenarioEstimator(domain, name))
|
found.setdefault(scenario.cohort, []).append(ScenarioEstimator(domain, name))
|
||||||
return found
|
return found
|
||||||
|
|||||||
Reference in New Issue
Block a user