nemo_gym.orchestration.executors.slurm
nemo_gym.orchestration.executors.slurm
The Slurm executor for Pyxis-enabled clusters: SlurmExecutor.
Its parts, each in its own module:
executor: render a run’s job scripts, submit them with sbatch and record the submission;chain: recovery of a run’s auto-resume chain (recovery_evidence,resubmit), mixed into the executor;judge_job: judge-only jobs that grade a run’s saved answers again (reverify_judge_failures), mixed in too;reader: the remote Store reader both of them read a run through;scheduler: the Slurm commands they share;script: render a benchmark’s sbatch script, andresume_script: the auto-resume prologue and epilogue it includes for a resumable job;lustre_md_stats: read the per-phase Lustre metadata counters a job records withlustre_md_stats: true.
Only Slurm implements resubmit today, so these parts are Slurm code with no scheduler-agnostic interface between them; the executor capabilities give resubmit its seam when a second scheduler needs one.
Submodules
nemo_gym.orchestration.executors.slurm.chainnemo_gym.orchestration.executors.slurm.executornemo_gym.orchestration.executors.slurm.judge_jobnemo_gym.orchestration.executors.slurm.judge_profilenemo_gym.orchestration.executors.slurm.lustre_md_statsnemo_gym.orchestration.executors.slurm.readernemo_gym.orchestration.executors.slurm.resume_scriptnemo_gym.orchestration.executors.slurm.schedulernemo_gym.orchestration.executors.slurm.script
Package Contents
Classes
API
Bases: ChainRecovery, JudgeJobs, BaseExecutor, Resubmittable, Terminable, LogReadable, Inspectable
Slurm executor for Pyxis-enabled clusters (https://github.com/NVIDIA/pyxis).
Every service and the driver are launched via srun --container-image so they
run inside the container specified in their config. Health checks run as plain
bash inside the sbatch script (no container needed — they just poll HTTP).
The resolved config persist() saved for this run, so a resubmit repeats what submit did.
Run gym eval export mlflow on the run’s saved artifacts from the login host, and report its result.
The export runs where the remote Store reader runs, with the run’s saved pinned Gym install (and its MLflow
extra) in a temporary checkout: it only reads the saved artifacts and talks to the tracking server, so it needs
no allocation. It takes the benchmark’s saved mlflow_* and upload_rollouts run settings, and its
credentials as the driver did: the submission’s forwarded environment and the driver’s env. Gym’s export takes
the run lock, prepares the health metrics and writes the receipt bound to the artifact digests, and skips a run
that already has one. The resubmit lock is held and no job of the chain may be live meanwhile.
The full Gym commit the run’s saved config pins its driver to; None when there is none or it is unreadable.
The Gym commit this launcher runs; the same value the judge-only job and a repin are checked against.
One script on one connection: a single squeue, a single sacct and each job directory’s state files.
The lines of source, read in one call; the location is relative to the job directory.
Cancel everything of job that is queued or running, the pending jobs first, in one script.