nirs4all.pipeline.dagml.process_adapter module
nirs4all process adapter — speaks the dag-ml JSONL frame protocol.
Wraps run_node() in the stdin/stdout control-frame loop that dag-ml-cli drives
(--describe handshake, then init/task/close frames, or bare one-shot
tasks). Mirrors dag-ml/examples/adapters/sklearn_process_controller.py exactly, but the
node execution fetches real SpectroDataset rows + real operators instead of synthesizing.
Launched per worker by the coordinator. main loads the dataset and the compiled graph
from env (N4A_DAGML_DATASET_PATH / N4A_DAGML_GRAPH_PATH) — the coordinator passes
only sample_ids per task, so the adapter owns the sample_id → X/y materialization
(the resolver) and the node_id → operator lookup (the compiled graph). run_jsonl_loop()
is dependency-injected so it is testable in-process with no subprocess.
Note: the launcher must re-exec this under the project venv — dag-ml-cli runs a .py
adapter under the system python3 (which lacks nirs4all), so a non-.py shim is used.