Skip to content

Run gym eval submit exports as their own job after the benchmark #5358

Open

Description

@prokotg

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_failure was 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 run succeeds, queues sbatch --partition=<cpu> export.sh and exits. A static afterok dependency from the submitter is wrong, because with auto-resume (resume_script.py) the first job can end TIMEOUT while the run continues. This needs sbatch to 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, because gym-job.json is written at submit time and never updated.
  • Kubernetes: exports are not supported there yet. A second batch/v1 Job per benchmark, created at submit time, with no GPU request and a CPU node_selector, waiting for a "run finished" marker on the PVC and then running the exports. It needs activeDeadlineSeconds, and a ReadWriteMany PVC (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 sbatch callable 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 ReadWriteMany for 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 TIMEOUT in 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.

Follows #4974 (exports in gym eval submit). Part of #2977.

Activity

  1. added
    feature
    area:orchestration
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:orchestrationfeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions