phenotypic.sdk_.resolve_execution_mode#
- phenotypic.sdk_.resolve_execution_mode(job_meta: dict | None) Literal['local', 'slurm'][source]#
Extract
ExecutionModefrom job metadata, defaulting to"local".Replaces a 5-site copy-paste of the
job_meta.get("execution_mode", "local") if job_meta else "local"pattern.Silent coercion: any value that isn’t exactly
"slurm"collapses to"local"— includingNone(no metadata file),{}(no key), garbage strings (e.g."validate",""), and the literalNonevalue. The function never raises. Callers who need to detect an unknown mode and warn / refuse should inspectjob_metadirectly before calling this helper.