kempnerpulse.selection¶
Cross-cutting tier — GPU visibility selection.
Resolves which GPU ids the dashboard should monitor, by precedence, from an
explicit --gpus list, --show-all, the SLURM/CUDA visibility environment,
and finally the set of accessible ids. The result is always intersected
(“clamped”) with the accessible set so a selection can never widen visibility
beyond what the process can actually reach.
This module reads os.environ and parses id strings; it does no I/O and never
shells out. Runtime dependencies are the standard library only.
Classes
Resolve the set of GPU ids to monitor by precedence. |
- class kempnerpulse.selection.GPUSelector[source]¶
Bases:
objectResolve the set of GPU ids to monitor by precedence.
- Parameters:
explicit – the raw
--gpusvalue, orNoneif unset.disable_auto – the
--show-allflag — ignore the environment and use the full accessible set.accessible – ids the process can actually reach (from nvidia-smi / dcgmi).
Nonemeans “unknown”, in which case no clamping is applied and selections pass through unfiltered.