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

オープン 初心者向け
#727 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA-NeMo/Run のほかの issue

NVIDIA-NeMo/Run の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。