Repository navigation
Description
Use cases, pain points, and background
gym eval submit runs each configured export as the tail of the benchmark's own job (#4974): once gym eval run exits 0, the driver step runs python3 -m nemo_gym.orchestration.export_step <exporter> ... for every export, inside the same allocation. That keeps the first version simple, but:
- The export holds the benchmark's GPUs while it uploads. An upload that waits for the destination's verdict can take tens of minutes.
- The scheduler cannot tell an evaluation failure from an export failure. Both are the job's outcome, so the first version only reports exports through per-export result files and never lets an export change the job's exit code (
on_failurewas dropped for that reason). - The export runs inside the job that the auto-resume chain supervises, which needed extra handling (a per-attempt
eval.succeeded.<job id>marker) so a lost model service does not end the job during an export. - The export has no walltime of its own.
Description
Run a benchmark's exports as their own job once its evaluation has finished successfully, on a CPU partition when one is configured, and keep the tail-of-job behavior as the fallback.
Design (a proposal, not a decision)
The exporter side does not change: gym eval export, Exporter.export, settings validation, the result files, and nemo_gym.orchestration.export_step (which such a job would run). Only how the executor launches it differs.
- Slurm: the benchmark's last job, the one whose
gym eval runsucceeds, queuessbatch --partition=<cpu> export.shand exits. A staticafterokdependency from the submitter is wrong, because with auto-resume (resume_script.py) the first job can endTIMEOUTwhile the run continues. This needssbatchto be callable from compute nodes (auto-resume already needs it, only when enabled), an optional export section in the Slurm compute config (partition, walltime, extra args, with the account reused), and somewhere to record the export job id, for example<bench_dir>/exports.job_id, becausegym-job.jsonis written at submit time and never updated. - Kubernetes: exports are not supported there yet. A second
batch/v1Job per benchmark, created at submit time, with no GPU request and a CPUnode_selector, waiting for a "run finished" marker on the PVC and then running the exports. It needsactiveDeadlineSeconds, and aReadWriteManyPVC (the access mode is unknown today). This avoids giving the run Job RBAC to create Jobs. - Fallback: when no export partition is configured, keep running the exports as the tail of the job, as today.
Open questions
- Is
sbatchcallable from compute nodes on the clusters we target? If not, the Slurm design needs another way to queue the export job. - Can the Kubernetes PVC be mounted
ReadWriteManyfor two Jobs? - Where should the export job id live so a later status or resubmit can find it?
Out of scope
- Changing exporters or their settings.
- Failing a benchmark because its export failed. What counts as a failed benchmark is a separate decision.
- A status command that reads the per-export result files.
Acceptance Criteria
- With an export partition configured on Slurm, a benchmark whose evaluation succeeds queues its exports as a separate job on that partition, and the benchmark job's allocation ends when the evaluation does.
- A job that ends
TIMEOUTin the middle of an auto-resume chain does not queue the export job; only the job whose evaluation succeeds does. - The export job id is recorded where later tooling can find it.
- An export failure does not change the benchmark job's outcome and cannot trigger auto-resume.
- Without an export partition, behavior is unchanged.
- Kubernetes: a second Job as described, or an explicit decision to leave it out.
- The docs describe the new setting.
Activity