verification/ out of the package; ISSSTELEÓN check; a Dask-level task failure is an error row

- verification/ (hk1k, issste, common) moved out of src/: not in the wheel;
  the image imports it with PYTHONPATH=/opt/tea-modulo.
- python -m verification issste: every biomarker, legacy and modern, on
  processed/eeg-edf-2025|2026; age from the EDF header inside the task; group
  numbers only (file names, paths, dates and rows stay in the job).
- Pipeline.map (Dask): a task that dies (KilledWorker) becomes an error row
  instead of stopping the batch.
- deploy/verify.sh [hk1k|issste]; issste uses 3 workers x 6 GiB per pod.
This commit is contained in:
AlbertoPMDM
2026-11-19 01:28:54 -06:00
parent 624774bfd9
commit 0e942e04c1
18 changed files with 665 additions and 304 deletions
+3
View File
@@ -14,3 +14,6 @@ ENV TEA_COMMIT=$TEA_COMMIT
LABEL tea_modulo.commit=$TEA_COMMIT
RUN pip install --no-cache-dir --no-deps -e /opt/tea-modulo
WORKDIR /opt/tea-modulo
# verification/ (cluster checks) is not in the package: import it from the checkout,
# on the runner and on the workers
ENV PYTHONPATH=/opt/tea-modulo
+12 -10
View File
@@ -1,9 +1,9 @@
# tea-verify: test suite + HK1K check, in its own Dask cluster: 9 pods x 4
# worker processes (1 thread, 4.25 GiB each), the size of the former "test"
# cluster less one pod (runner + scheduler use part of a node). If other
# clusters share the nodes, lower replicas / requests.
# Applied by deploy/verify.sh (it substitutes COMMIT). HK1K (public) only;
# the eeg-data PVC (patient data) is NOT mounted.
# tea-verify: a cluster check of tea_modulo in its own Dask cluster, 9 pods.
# hk1k: test suite + HK1K check; 4 workers per pod x 4.25 GiB
# issste: ISSSTELEÓN check on processed/eeg-edf-2025|2026 (group summaries
# only); 3 workers per pod x 6 GiB (long recordings)
# Applied by deploy/verify.sh, which substitutes COMMIT, CHECK, NWORKERS and
# MEMLIMIT. The eeg-data PVC is NOT mounted; S3 is read in the tasks only.
apiVersion: kubernetes.dask.org/v1
kind: DaskJob
metadata:
@@ -22,9 +22,11 @@ spec:
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/
if [ "CHECK" = hk1k ]; then
python -m pytest -q -p no:cacheprovider -m "not cluster"
python -m pytest -q -p no:cacheprovider -m cluster
fi
python -m verification CHECK --out processed/usuarios/alberto/tea-verify/
env:
- {name: OMP_NUM_THREADS, value: "1"}
- {name: OPENBLAS_NUM_THREADS, value: "1"}
@@ -40,7 +42,7 @@ 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]
args: [dask-worker, --name, $(DASK_WORKER_NAME), --nworkers, "NWORKERS", --nthreads, "1", --memory-limit, MEMLIMIT]
resources:
requests: {memory: 19Gi, cpu: "4"}
limits: {memory: 19Gi}
+8 -3
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Build, push and run the tea-verify DaskJob for the current commit.
# deploy/verify.sh build + push + apply
# deploy/verify.sh [hk1k] build + push + apply: tests + HK1K check
# deploy/verify.sh issste build + push + apply: ISSSTELEÓN check (group numbers only)
# deploy/verify.sh --logs follow the job pod's log
# deploy/verify.sh --delete remove the DaskJob
set -euo pipefail
@@ -9,6 +10,9 @@ REG=192.168.20.18:5000
case "${1:-}" in
--logs) exec kubectl logs -f tea-verify-runner ;;
--delete) exec kubectl delete daskjob tea-verify --ignore-not-found ;;
""|hk1k) CHECK=hk1k; NW=4; MEM=4.25GiB ;;
issste) CHECK=issste; NW=3; MEM=6GiB ;;
*) echo "usage: deploy/verify.sh [hk1k|issste|--logs|--delete]" >&2; exit 2 ;;
esac
if [ -n "$(git status --porcelain --ignore-submodules=none)" ]; then
echo "uncommitted changes: commit first, so the image tag is a real commit" >&2; exit 1
@@ -17,5 +21,6 @@ C=$(git rev-parse --short HEAD)
docker build -f deploy/Dockerfile.verify --build-arg TEA_COMMIT="$C" -t "$REG/tea-verify:$C" .
docker push "$REG/tea-verify:$C"
kubectl delete daskjob tea-verify --ignore-not-found
sed "s/tea-verify:COMMIT/tea-verify:$C/g" deploy/dask-verify.yaml | kubectl apply -f -
echo "applied tea-verify:$C — follow with: deploy/verify.sh --logs"
sed -e "s/tea-verify:COMMIT/tea-verify:$C/g" -e "s/CHECK/$CHECK/g" -e "s/NWORKERS/$NW/g" \
-e "s/MEMLIMIT/$MEM/g" deploy/dask-verify.yaml | kubectl apply -f -
echo "applied tea-verify:$C ($CHECK) — follow with: deploy/verify.sh --logs"