ISSSTELEON models 2ff634c
This commit is contained in:
+2
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user