rename: tea-modulo / tea_modulo -> tea (distribution, package, entry-point groups, MLflow names, image paths)
This commit is contained in:
@@ -1 +1 @@
|
||||
"""Cluster checks of tea_modulo (testing only; not part of the distributed package)."""
|
||||
"""Cluster checks of tea (testing only; not part of the distributed package)."""
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""python -m verification {hk1k|issste} --out processed/usuarios/<name>/tea-verify/
|
||||
python -m verification mlflow [--uri http://10.0.10.41:5000] [--table features.csv]
|
||||
|
||||
Cluster checks of tea_modulo. They live outside the package (not in the wheel):
|
||||
they are for testing only, and run from the tea-verify image (PYTHONPATH=/opt/tea-modulo)."""
|
||||
Cluster checks of tea. They live outside the package (not in the wheel):
|
||||
they are for testing only, and run from the tea-verify image (PYTHONPATH=/opt/tea)."""
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def clean(text) -> str:
|
||||
|
||||
def write_summary(text: str, out_prefix: str, name: str) -> str:
|
||||
"""In a task: write the summary JSON under processed/usuarios/... (never raw/ or eeg-edf)."""
|
||||
from tea_modulo.pipeline.storage import s3
|
||||
from tea.pipeline.storage import s3
|
||||
if not out_prefix.startswith("processed/usuarios/") or ".." in out_prefix:
|
||||
raise PermissionError("summaries go only under processed/usuarios/<name>/")
|
||||
key = out_prefix.rstrip("/") + "/" + name
|
||||
@@ -88,8 +88,8 @@ def diagnose(path, age_months, plan, modules, order, biomarkers, line_hz, name_f
|
||||
reported only when `name_file` (public data)."""
|
||||
import traceback
|
||||
|
||||
from tea_modulo.contracts import Study
|
||||
from tea_modulo.pipeline import storage
|
||||
from tea.contracts import Study
|
||||
from tea.pipeline import storage
|
||||
out = {"file": Path(str(path)).name if name_file else None, "step": None, "error": "",
|
||||
"traceback": ""}
|
||||
step = "read"
|
||||
@@ -126,8 +126,8 @@ def run_impls(client, items, *, plan, impls, biomarkers, check_n, line_hz, name_
|
||||
maps a group label to the item indices it holds (e.g. lot, age group)."""
|
||||
import pandas as pd
|
||||
|
||||
from tea_modulo.pipeline import Pipeline, run_study
|
||||
from tea_modulo.pipeline.run_study import order_for
|
||||
from tea.pipeline import Pipeline, run_study
|
||||
from tea.pipeline.run_study import order_for
|
||||
|
||||
paths, ages = [p for p, _ in items], [a for _, a in items]
|
||||
infos, tables = {}, {}
|
||||
|
||||
@@ -41,7 +41,7 @@ def list_hk1k(base: str = HK1K) -> list[tuple[str, float]]:
|
||||
"""In a task: (s3 path, age in months) of each HK1K EDF with an age."""
|
||||
import pandas as pd
|
||||
|
||||
from tea_modulo.pipeline.storage import s3
|
||||
from tea.pipeline.storage import s3
|
||||
fs = s3()
|
||||
paths = fs.find(guard(base))
|
||||
tables = [r for r in paths if r.endswith("anon_codex_age_sex.csv")]
|
||||
@@ -60,8 +60,8 @@ def main(argv=None) -> int:
|
||||
|
||||
from distributed import Client
|
||||
|
||||
from tea_modulo.pipeline.dask_runner import scheduler_address
|
||||
from tea_modulo.preprocessing import DIRECTOR_CLUSTER
|
||||
from tea.pipeline.dask_runner import scheduler_address
|
||||
from tea.preprocessing import DIRECTOR_CLUSTER
|
||||
|
||||
ap = argparse.ArgumentParser(prog="python -m verification hk1k")
|
||||
ap.add_argument("--out", required=True)
|
||||
|
||||
@@ -49,7 +49,7 @@ def guard(path: str) -> str:
|
||||
|
||||
def list_lot(prefix: str) -> list[str]:
|
||||
"""In a task: s3 paths of the EDFs of one lot (they stay in the runner pod)."""
|
||||
from tea_modulo.pipeline.storage import s3
|
||||
from tea.pipeline.storage import s3
|
||||
return sorted("s3://" + guard(r) for r in s3().find(guard(prefix)) if r.lower().endswith(".edf"))
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ def age_from_header(header: bytes) -> float | None:
|
||||
|
||||
def header_age(path: str) -> float | None:
|
||||
"""In a task: the age of one EDF (reads only its first 256 bytes)."""
|
||||
from tea_modulo.pipeline.storage import s3
|
||||
from tea.pipeline.storage import s3
|
||||
with s3().open(guard(path), "rb") as f:
|
||||
return age_from_header(f.read(256))
|
||||
|
||||
@@ -100,8 +100,8 @@ def main(argv=None) -> int:
|
||||
|
||||
from distributed import Client
|
||||
|
||||
from tea_modulo.pipeline.dask_runner import scheduler_address
|
||||
from tea_modulo.preprocessing import DIRECTOR_CLUSTER
|
||||
from tea.pipeline.dask_runner import scheduler_address
|
||||
from tea.preprocessing import DIRECTOR_CLUSTER
|
||||
|
||||
ap = argparse.ArgumentParser(prog="python -m verification issste")
|
||||
ap.add_argument("--out", required=True)
|
||||
|
||||
@@ -9,8 +9,8 @@ logged and registered in MLflow, then loaded back in a fresh interpreter.
|
||||
- Training data: a measured feature table (--table, or the tables the HK1K check
|
||||
passes in); otherwise a synthetic table, tagged data=synthetic, which checks
|
||||
only the registration path, not the baselines.
|
||||
- Registered names: tea_modulo-test.plan.<plan>, tea_modulo-test.<impl>.<biomarker>,
|
||||
in the experiment "tea_modulo · registro (prueba)".
|
||||
- Registered names: tea-test.plan.<plan>, tea-test.<impl>.<biomarker>,
|
||||
in the experiment "tea · registro (prueba)".
|
||||
- Each model is loaded in a new Python process; its predictions must equal the
|
||||
in-memory module's.
|
||||
|
||||
@@ -29,8 +29,8 @@ import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
DEFAULT_URI = "http://10.0.10.41:5000"
|
||||
EXPERIMENT = "tea_modulo · registro (prueba)"
|
||||
PREFIX = "tea_modulo-test"
|
||||
EXPERIMENT = "tea · registro (prueba)"
|
||||
PREFIX = "tea-test"
|
||||
LOCAL = Path("mlflow_local")
|
||||
|
||||
|
||||
@@ -111,9 +111,9 @@ def register_all(tables=None, *, uri: str | None = DEFAULT_URI, data_label: str
|
||||
import mlflow
|
||||
import pandas as pd
|
||||
|
||||
from tea_modulo.pipeline import Pipeline
|
||||
from tea_modulo.preprocessing import DIRECTOR_CLI, DIRECTOR_CLUSTER
|
||||
from tea_modulo.serving import load_plan, log_biomarker, log_plan
|
||||
from tea.pipeline import Pipeline
|
||||
from tea.preprocessing import DIRECTOR_CLI, DIRECTOR_CLUSTER
|
||||
from tea.serving import load_plan, log_biomarker, log_plan
|
||||
|
||||
os.environ.setdefault("MLFLOW_DISABLE_AGENT_HINT", "1")
|
||||
chosen = use_store(uri, fallback_local)
|
||||
|
||||
Reference in New Issue
Block a user