T17: models sweep: unused helpers in execution, association and the EEG analysis and checks removed

This commit is contained in:
2026-12-01 06:07:45 -06:00
parent 83639e708d
commit c649ad9308
4 changed files with 1 additions and 18 deletions
-6
View File
@@ -15,13 +15,10 @@ from persistance.cluster import (
ClusterVersionError,
Execution,
ExecutionError,
Health,
Options,
Progress,
Resolved,
Tasks,
Worker,
health,
options,
resolve,
)
@@ -30,11 +27,8 @@ __all__ = [
"ClusterVersionError",
"Execution",
"ExecutionError",
"Health",
"Options",
"Progress",
"Resolved",
"health",
"map",
"options",
"resolve",
-3
View File
@@ -587,9 +587,6 @@ class Ados2Association:
return cls(d["level"], d["fitted"])
MODULE = Ados2Association()
class Model(mlflow.pyfunc.PythonModel):
def __init__(self, fitted: dict):
self.fitted = json.loads(json.dumps(fitted, default=float))
+1 -5
View File
@@ -12,12 +12,12 @@ recording start minus `birth_date`. `analyze` never raises: a failure is an `Ana
are None.
"""
import math
import re
from dataclasses import dataclass, field
from datetime import date
from models.tea.eeg import biomarkers, checks, preprocess, read, sleep
from models.tea.eeg.curves import _number
DAYS_PER_MONTH = 30.4375
MAINS_HZ = 60.0
@@ -49,10 +49,6 @@ class Analysis:
error: str | None
def _number(v) -> float | None:
return float(v) if v is not None and math.isfinite(v) else None
def _error(exc: Exception) -> str:
message = re.sub(r"(/|[A-Za-z]:\\)[^\s'\"]*", "<path>", str(exc))[:300]
return f"{type(exc).__name__}: {message}"
-4
View File
@@ -48,10 +48,6 @@ class Validation:
line_db: float
checks: list[dict] = field(default_factory=list)
@property
def ears_usable(self) -> bool:
return all(ear not in self.bad for ear in ("A1", "A2"))
def check(
code,