TEA EEG: training and analysis choose the cluster, EEG ids are text, run progress snapshots; tea library pointer
This commit is contained in:
@@ -184,3 +184,20 @@ def test_a_reference_study_is_measured_from_its_path(tmp_path):
|
||||
assert (st.valid, st.error) == (1, None)
|
||||
assert set(st.features) == set(settings().scenarios.values())
|
||||
assert set(st.features["spindles", "N2"]) == set(pipeline(settings()).module("spindles").features)
|
||||
|
||||
|
||||
def test_training_reads_the_cluster_choice_from_the_environment(monkeypatch):
|
||||
"""Pins down: training measures its studies on the runner `EEG_ANALYSIS_CLUSTER` names, and falls back to `auto`
|
||||
for an unset or unknown value (including `off`, which only the analysis understands).
|
||||
|
||||
Fails if `run_steps` stops passing the choice to `train_all`, or lets an unknown value reach the runner.
|
||||
"""
|
||||
from models.tea.eeg import model
|
||||
|
||||
monkeypatch.delenv("EEG_ANALYSIS_CLUSTER", raising=False)
|
||||
assert model._cluster() == "auto"
|
||||
for chosen in ("auto", "local", "remote", "sync"):
|
||||
monkeypatch.setenv("EEG_ANALYSIS_CLUSTER", chosen)
|
||||
assert model._cluster() == chosen
|
||||
monkeypatch.setenv("EEG_ANALYSIS_CLUSTER", "off")
|
||||
assert model._cluster() == "auto"
|
||||
|
||||
Reference in New Issue
Block a user