SlurmExecutor: `no_requeue` has no effect because `--requeue` is hard-coded

未关闭 适合新手
#727 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python

调研方向

从 issue 中引用的 nemo_run/run/torchx_backend/schedulers/slurm.py 里 sbatch 命令的位置开始,然后检查 nemo_run/run/ray/slurm.py 和 dry-run 输出。验证这些路径如何处理 requeue、no_requeue 和 SBATCH_NO_REQUEUE。完成标准是:默认仍允许 requeue,任一退出选项都会将其禁用,并且 dry run 显示一致的提交选项和脚本选项。

由索引模型根据 Issue 内容生成。

描述

community-request

Describe the bug

The Slurm scheduler always runs sbatch --requeue --parsable ... (slurm.py#L180, also #L148, #L253, ray/slurm.py#L591). As a result, neither additional_parameters={"no_requeue": True} nor SBATCH_NO_REQUEUE=1 can turn requeue off.

Steps/Code to reproduce bug

import nemo_run as run

executor = run.SlurmExecutor(
    account="my_account",
    tunnel=run.LocalTunnel(job_dir="/tmp/nemo_run_repro"),
    additional_parameters={"no_requeue": True},
)
run.run(run.Script(inline="echo hello"), executor=executor, dryrun=True)

The dry run shows the job script asks for no requeue, but it is submitted with --requeue:

sbatch --requeue --parsable $SBATCH_SCRIPT
...
#SBATCH --no-requeue

Submitted like this, the job is requeueable (Slurm 24.11: scontrol show job <id> shows Requeue=1), because sbatch's command line overrides #SBATCH lines and SBATCH_* environment variables.

Expected behavior

Requeue stays the default, but no_requeue or SBATCH_NO_REQUEUE=1 turns it off.

Additional context

Possible fix: write requeue as #SBATCH --requeue like the other options (unless the user sets requeue or no_requeue), and drop --requeue from the sbatch commands.

主要语言
Python
星标
268
派生
121
平均合并
3 小时 42 分钟
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA-NeMo/Run 的其他 Issue

查看 NVIDIA-NeMo/Run 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。