nirs4all.pipeline.dagml.resources module
Run-local DAG-ML execution resource declarations.
The value is stored in a contextvars.ContextVar so concurrent runs do
not communicate through process-global environment variables. Both the
in-process binding and the subprocess CLI read the same normalized contract.
- class nirs4all.pipeline.dagml.resources.DagMLExecutionResources(cpu_threads: int = 1, gpu_devices: tuple[str, ...] = ())[source]
Bases:
objectResources declared for every host task in one DAG-ML run.
- nirs4all.pipeline.dagml.resources.bind_execution_resources(resources: DagMLExecutionResources) Token[source]
Bind resources to the current run context and return its reset token.
- nirs4all.pipeline.dagml.resources.normalize_execution_resources(cpu_threads: Any = 1, gpu_devices: Any = ()) DagMLExecutionResources[source]
Validate and canonicalize public DAG-ML resource options.