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:
+14
-1
@@ -93,6 +93,19 @@ def test_no_posterior_channels_is_not_an_error(tmp_path):
|
||||
assert not np.isfinite(t.posterior_rhythm_hz.iloc[0]), impl
|
||||
|
||||
|
||||
def _inverse(x):
|
||||
return 1 / x
|
||||
|
||||
|
||||
def test_task_failure_becomes_a_row_not_a_stopped_batch():
|
||||
"""A task that fails at the Dask level (KilledWorker on the cluster) must not stop the batch."""
|
||||
out = dask_runner.run(_inverse, [(1,), (0,), (4,)], cluster="local", n_workers=1,
|
||||
memory_per_worker="1GiB", on_error=lambda a, e: f"{type(e).__name__} {a[0]}")
|
||||
assert out == [1.0, "ZeroDivisionError 0", 0.25]
|
||||
with pytest.raises(ZeroDivisionError):
|
||||
dask_runner.run(_inverse, [(0,)], cluster="local", n_workers=1, memory_per_worker="1GiB")
|
||||
|
||||
|
||||
def test_positive_priority_refused():
|
||||
with pytest.raises(ValueError, match="positive priorities"):
|
||||
dask_runner.run(lambda: 1, [()], cluster="sync", priority=1)
|
||||
@@ -137,6 +150,6 @@ def test_study_raises_not_valid(edfs):
|
||||
def test_remote_equals_sync(edfs):
|
||||
"""On the cluster job: the synthetic files are local to the job pod, so they are
|
||||
read by the driver-side sync run only; the remote run uses the HK1K check instead
|
||||
(tea_modulo.verify). Here we only check the remote scheduler answers a trivial graph."""
|
||||
(verification/, python -m verification hk1k). Here we only check the remote scheduler answers a trivial graph."""
|
||||
out = dask_runner.run(lambda x: x * 2, [(1,), (2,)], cluster="remote")
|
||||
assert out == [2, 4]
|
||||
|
||||
Reference in New Issue
Block a user