Files
tea/deploy/dask-verify.yaml
T
AlbertoPMDM 4956f36d80 serving (MLflow), HK1K verification command and the tea-verify DaskJob
- serving: plans and biomarkers as MLflow "models from code" (standalone
  wrapper files), code_paths = only the module's package + contracts;
  plan.json artifact and plan params; biomarker models pin plan_uri and
  plan_hash. privacy: no study codes / dates / paths, binary artifacts
  refused, baselines from fewer than 5 children refused.
- verify: python -m tea_modulo.verify hk1k lists HK1K in a worker task, runs
  the pipeline remotely (line 50 Hz), checks the remote run equals a plain
  sequential run in one task, summarizes the posterior rhythm by age group
  (groups < 5 suppressed) and writes the summary under processed/usuarios/.
  Any input prefix but raw/eeg-helsinki/ is refused.
- deploy: Dockerfile.verify (dask:1.1 + antropy, fhir.resources, meegkit,
  pytest; tea-modulo from the local checkout), .dockerignore keeping .venv,
  eeg/ and any signal or patient file out, dask-verify.yaml (own 2x4-worker
  cluster, no eeg-data PVC, keys only on workers), verify.sh.

Tests: MLflow round trips on sqlite, model loads with only its own code in
a fresh interpreter, privacy refusals, verify guards.
2026-11-18 20:24:03 -06:00

69 lines
2.4 KiB
YAML

# tea-verify: test suite + HK1K check, in its own small Dask cluster.
# Applied by deploy/verify.sh (it substitutes COMMIT). HK1K (public) only;
# the eeg-data PVC (patient data) is NOT mounted.
apiVersion: kubernetes.dask.org/v1
kind: DaskJob
metadata:
name: tea-verify
spec:
job:
spec:
restartPolicy: Never
containers:
- name: job
image: 192.168.20.18:5000/tea-verify:COMMIT
workingDir: /opt/tea-modulo
command: [sh, -c]
args:
- |
set -e
export DASK_SCHEDULER="$DASK_SCHEDULER_ADDRESS"
export MLFLOW_DISABLE_AGENT_HINT=1
python -m pytest -q -p no:cacheprovider -m "not cluster"
python -m pytest -q -p no:cacheprovider -m cluster
python -m tea_modulo.verify hk1k --out processed/usuarios/alberto/tea-verify/
env:
- {name: OMP_NUM_THREADS, value: "1"}
- {name: OPENBLAS_NUM_THREADS, value: "1"}
- {name: MKL_NUM_THREADS, value: "1"}
resources:
requests: {memory: 6Gi, cpu: "2"}
limits: {memory: 6Gi}
cluster:
spec:
worker:
replicas: 2
spec:
containers:
- name: worker
image: 192.168.20.18:5000/tea-verify:COMMIT
args: [dask-worker, --name, $(DASK_WORKER_NAME), --nworkers, "4", --nthreads, "1", --memory-limit, 4.25GiB]
resources:
requests: {memory: 19Gi, cpu: "4"}
limits: {memory: 19Gi}
env:
- {name: AWS_ENDPOINT_URL, value: "http://seaweedfs-s3.seaweedfs:8333"}
- {name: OMP_NUM_THREADS, value: "1"}
- {name: OPENBLAS_NUM_THREADS, value: "1"}
- {name: MKL_NUM_THREADS, value: "1"}
- {name: MLFLOW_DISABLE_AGENT_HINT, value: "1"}
envFrom:
- secretRef: {name: seaweed-s3}
scheduler:
spec:
containers:
- name: scheduler
image: 192.168.20.18:5000/tea-verify:COMMIT
args: [dask-scheduler]
ports:
- {name: tcp-comm, containerPort: 8786}
- {name: http-dashboard, containerPort: 8787}
service:
type: ClusterIP
selector:
dask.org/cluster-name: tea-verify
dask.org/component: scheduler
ports:
- {name: tcp-comm, port: 8786, targetPort: tcp-comm}
- {name: http-dashboard, port: 8787, targetPort: http-dashboard}