nemo_gym.orchestration.executors.resume_script
nemo_gym.orchestration.executors.resume_script
The auto-resume prologue: a self-chaining Slurm job.
Rendered at the top of a benchmark’s sbatch script, ahead of every
service/driver command, when BenchmarkRunConfig.resumable is set. Each job
in the chain inspects the PREVIOUS job (passed as $1) via sacct, decides
whether to continue, and unconditionally queues its own successor with an
afternotok dependency before doing any real work. A job that COMPLETEs
leaves its queued successor with a dependency that can never be satisfied, so
Slurm cancels it on its own — the chain needs no explicit “we’re done” step
on the success path.
Module Contents
Functions
Data
API
Convert a Slurm-style duration string to seconds.
Covers the subset of Slurm’s --time grammar that max_walltime accepts:
MM, MM:SS, HH:MM:SS, D-HH, D-HH:MM, D-HH:MM:SS — the same
spellings Slurm itself takes, so a value can be copied straight from
compute.walltime.
Render the auto-resume prologue for one benchmark’s sbatch script.