Skip to content

feat(cli): add gym job resubmit - #5444

Merged
marta-sd merged 3 commits into
mainfrom
prokotg/gym-job-resubmit
Nov 19, 2026
Merged

marta-sd merged 3 commits into
mainfrom
prokotg/gym-job-resubmit

Conversation

@prokotg

@prokotg prokotg commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #5357 (which is stacked on #5345, #5344 and #5295): this branch is based on prokotg/gym-job-hint, so the diff shows only this PR. I retarget it as the PRs below it merge. The whole stack was rebased onto main after #6228 (recovery moved to nemo_gym/eval/recovery/, the Slurm and Kubernetes executors split into packages).

  • gym job resubmit ID BENCH queues a benchmark of a submitted run again and prints the new job id, exactly what the plain gym eval resubmit ID BENCH prints. It has no recovery options.
  • One shared implementation. Both commands call the same _queue_again helper, which calls the existing submit.resubmit. Slurm has been Resubmittable since feat(orchestration): add job-management interfaces and types #5295, so no executor changes.
  • gym eval resubmit is unchanged. It keeps its recovery options (--recover, --inspect, --repin, --max-walltime and the rest) and is not deprecated. Moving recovery and reverify under gym job needs its own care and is a follow-up; gym eval resubmit is deprecated only after that.
  • The Job Management page documents gym job resubmit and says that gym eval resubmit also does recovery.

PR plan

Five PRs, Slurm only. Goal: status, cancel and logs for a submitted run without going to the scheduler.

  1. feat(orchestration): add job-management interfaces and types #5295: the types, the capability interfaces, the operations declared, and the submit-time log plan.
  2. feat(cli): add gym job list, status and info #5344: the logic of status and info, Slurm Inspectable, gym job list, status, info.
  3. feat(cli): add gym job cancel and logs #5345: the logic of cancel, cancel_submission and logs, Slurm Terminable and LogReadable, gym job cancel and logs.
  4. feat(cli): tell the user what to type after gym eval submit #5357: gym eval submit tells you what to type next.
  5. This PR: gym job resubmit, the plain resubmit; gym eval resubmit keeps recovery.

Validation

  • 4 new tests: gym job resubmit prints the new job id; it offers no recovery options while gym eval resubmit still offers --recover, --inspect, --repin and --max-walltime; it refuses a stray Hydra override and lets the verbose one through; and it reports an executor that cannot resubmit (Kubernetes) with the usual message and exit code 1.
  • The existing gym eval resubmit tests are unchanged and pass.
  • Recovery, orchestration, gym job, CLI, moved-paths, import-linter and boundary tests: 4502 passed, 131 failed. Every failure is a macOS or stale-environment failure that also happens on clean main: the recovery and orchestration ones match the baseline, and the 35 in tests/unit_tests/cli are identical on a clean main worktree.
  • pre-commit run --all-files passes.

Known gaps

  • Not run against a Slurm cluster; resubmit itself is unchanged, and its executor tests are untouched.
  • gym job resubmit prints only the job id, as gym eval resubmit does, so scripts that read it keep working.

Rollout evidence

N/A: no agent, verifier or model behavior is touched, and the output of both commands is unchanged.

@prokotg prokotg added feature New capabilities, enhancements, or enablement work area:orchestration Job submission, deployment, services, and lifecycle management area:cli Command-line interfaces and user-facing command behavior labels Nov 2, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@prokotg

prokotg commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 89da248

@prokotg

prokotg commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

@prokotg

prokotg commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c907c1a

@prokotg
prokotg marked this pull request as ready for review November 4, 2026 11:54
@prokotg
prokotg requested a review from AdamRajfer November 4, 2026 11:54
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 18, 2026 13:26
@prokotg

prokotg commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 5e286b1

@prokotg

prokotg commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

Both prior findings are fixed. The resubmit test module no longer contains the calendar-dependent removal assertion. The job-management documentation now distinguishes built-in resume from custom-command reruns and makes chain-budget reset conditional on configured auto-resume.

I also checked recovery compatibility and the affected regression assertions. eval resubmit still routes recovery through the planner without a deprecation warning. The operator guidance now excludes both plain resubmit names from recovery workflows.

No remaining eligible findings. This follow-up covered the earlier findings and identifiable subsequent changes, not a fresh whole-PR review. The previously reviewed tree was unavailable, so I could not independently compare the full inter-review delta. This was static inspection; I did not run tests or Slurm jobs.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@AdamRajfer AdamRajfer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Adam’s AI assistant

Adam's assistant reviewed this for him. Verdict: the temporary glue is fine, with one note.

gym eval resubmit is not deprecated, and its plain path still prints only the job id on stdout, so its callers see no change. --recover and --inspect still go through the planner. gym job resubmit is the plain resubmit without recovery, which is why the docs and the skill rule say not to use it in place of --recover.

Note: the summary in gym job --help should say the same. Something like "plain resubmit, no recovery, use gym eval resubmit --recover --inspect when a run needs a decision", because that is where people look first.

@prokotg
prokotg force-pushed the prokotg/gym-job-resubmit branch from 5e286b1 to 58419f6 Compare November 18, 2026 15:38
@prokotg
prokotg force-pushed the prokotg/gym-job-resubmit branch from 58419f6 to e9160a8 Compare November 19, 2026 08:20
marta-sd
marta-sd previously approved these changes Nov 19, 2026
@prokotg

prokotg commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test d671c83

@prokotg

prokotg commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

@AdamRajfer thanks, good call, the help is the first place people look. gym job resubmit now reads "Plain resubmit of one benchmark, no recovery; for a decision use gym eval resubmit --recover." (d671c83). I kept it inside the one-line limit of the listing, so --inspect isn't in the text; the docs page and the skill rule cover that part.

One small extra while I was in there: inspect_recovery was the only entry point behind the two commands that didn't print the experimental warning, so gym eval resubmit --recover --inspect was silent while --recover warned. I marked it too. It's stderr only, nothing on stdout changes.

@prokotg
prokotg added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Nov 19, 2026
@prokotg
prokotg added this pull request to the merge queue Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/44497337699

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Nov 19, 2026
@prokotg
prokotg force-pushed the prokotg/gym-job-resubmit branch from d671c83 to c5e6dc9 Compare November 19, 2026 09:50
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 19, 2026 09:51
@marta-sd
marta-sd force-pushed the prokotg/gym-job-resubmit branch from c5e6dc9 to e1bdb2b Compare November 19, 2026 09:57
Base automatically changed from prokotg/gym-job-hint to main November 19, 2026 09:58
gym job resubmit queues a benchmark of a submitted run again and prints the new job id. It runs the plain resubmit that gym eval resubmit shares with it; gym eval resubmit keeps its recovery options (--recover, --inspect and the rest) and is not deprecated.

Signed-off-by: Tomasz Grzegorzek <[email protected]>
…nspect_recovery experimental

The one-line help of gym job resubmit now says it is the plain resubmit with no recovery and points at gym eval resubmit --recover. inspect_recovery, which gym eval resubmit --inspect calls, was the only entry point behind the two commands that did not warn that it is experimental.

Signed-off-by: Tomasz Grzegorzek <[email protected]>
@marta-sd
marta-sd force-pushed the prokotg/gym-job-resubmit branch from e1bdb2b to 16dee6b Compare November 19, 2026 09:58
@marta-sd
marta-sd merged commit c6a9adf into main Nov 19, 2026
17 checks passed
@marta-sd
marta-sd deleted the prokotg/gym-job-resubmit branch November 19, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli Command-line interfaces and user-facing command behavior area:orchestration Job submission, deployment, services, and lifecycle management feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants