Files
models/models/base.py
T
Roberto Treviño Cervantes ca9d3ad81f initial commit
2026-09-21 10:23:42 -06:00

22 lines
766 B
Python

from abc import ABC, abstractmethod
from typing import Any
class ScreeningModel(ABC):
"""Standard train()/predict() interface every screening model implements,
regardless of which of the three data marts (CaCu/CaMa/TEA) it targets.
Implementations are free to pull their own data straight from
`persistance.<domain>` — the same standard repository API WebApi uses —
or accept already-fetched rows from a caller; `data` is intentionally
untyped at this scaffolding stage.
"""
@abstractmethod
def train(self, data: Any = None) -> None:
"""Fit the model, optionally on `data` passed in by the caller."""
@abstractmethod
def predict(self, data: Any) -> Any:
"""Score `data` and return predictions."""