phenotypic.sdk_.slurm.generate_dispatcher_chain#
- phenotypic.sdk_.slurm.generate_dispatcher_chain(chunk_scripts: List[Path], output_dir: Path, slurm_args: Dict[str, Any], log_dir: Path, finalizer_script: Path | None = None) List[Path][source]#
Generate dispatcher scripts for a chain of chunk scripts.
For N chunk scripts, generates N-1 dispatcher scripts. Each dispatcher submits the next chunk and (if not last) the next dispatcher with
--dependency=afteranyon that chunk.- Parameters:
chunk_scripts (List[Path]) – Ordered list of array job chunk script paths.
output_dir (Path) – Directory to write dispatcher scripts into.
slurm_args (Dict[str, Any]) – SLURM parameters dict (partition, etc.).
log_dir (Path) – Directory for dispatcher log files.
finalizer_script (Path | None) – Terminal finalizer passed only to the last dispatcher in the chain.
- Returns:
List of dispatcher script paths (one fewer than
chunk_scripts, since the last chunk does not need a dispatcher). Empty if only one chunk exists.- Return type: