ISSSTELEON models 2ff634c

This commit is contained in:
Roberto Treviño
2026-11-29 21:30:26 -06:00
parent 41508efeb6
commit 2457859a09
10 changed files with 63 additions and 192 deletions
+2 -6
View File
@@ -31,7 +31,7 @@ class Jobs:
return f"{self.domain}_events"
def routine(self) -> list[str]:
return [n for n, s in self.models.items() if not getattr(s, "slow", False)]
return list(self.models)
def scored(self) -> list[str]:
return list(self.models)
@@ -41,9 +41,7 @@ class Jobs:
def train(self, name: str, as_of: date | None = None) -> int:
spec, as_of = (self.models[name], as_of or date.today())
if spec.cohort is None:
fitted, metrics, found = spec.train(None, as_of)
elif getattr(spec, "reports", False):
if getattr(spec, "reports", False):
events = gold.timelines(self.events, spec.cohort, as_of)
if events.empty:
raise EmptyCohort(f"{self.registered(name)}: nobody in {spec.cohort}")
@@ -63,8 +61,6 @@ class Jobs:
return registry.register(self.registered(name), model, params, metrics, found)
def score(self, name: str) -> int | None:
if self.models[name].cohort is None:
return None
found = registry.champion(self.registered(name))
if found is None:
return None