Skip to content

Propagate exclude_nodes to remaining get_nodes_by_spec callers - #1034

Open
AmirF194 wants to merge 1 commit into
NVIDIA:mainfrom
AmirF194:fix/832-exclude-nodes-propagation
Open

AmirF194 wants to merge 1 commit into
NVIDIA:mainfrom
AmirF194:fix/832-exclude-nodes-propagation

Conversation

@AmirF194

@AmirF194 AmirF194 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #832

Wired exclude_nodes through the six call sites you listed, same pattern as #830: parse test_run.exclude_nodes and pass it as exclude_nodes=... into get_nodes_by_spec. single_sbatch_runner.py's extract_sbatch_nodes_spec unions exclude_nodes across all test runs in the batch before calling it once.

One correction to the issue: deepep/slurm_command_gen_strategy.py no longer needs a change. It routes through get_cached_nodes_spec() now (both call sites), which already forwards exclude_nodes since #830, so it's not one of the remaining gaps.

Added a regression test per call site asserting the mock forwards exclude_nodes (or, where the node names are literal, that the excluded node is actually missing from the result). The new test at each site is red without the fix. Full suite, coverage, ruff, pyright and pre-commit are clean; the test_base_installer/test_test_definitions failures are the same root-in-container filesystem permission ones main already has.

… sites

PR NVIDIA#830 threaded exclude_nodes through the cached node-allocation path
(get_cached_nodes_spec), but six other call sites still call
get_nodes_by_spec without it: nemo_run, nemo_launcher, triton_inference
and ai_dynamo's own cached-spec override, the shared
_enable_vboost_cmd, and both call sites in SingleSbatchRunner
(extract_sbatch_nodes_spec, get_single_tr_block). A user's
exclude_nodes setting is silently ignored on any of those paths.

Signed-off-by: Amir Fathi <amirfathi.me@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 3bde446d-2ca1-421c-ac67-1bf12764b212

📥 Commits

Reviewing files that changed from the base of the PR and between 6b04b75 and 49d3052.

📒 Files selected for processing (12)
  • src/cloudai/systems/slurm/single_sbatch_runner.py
  • src/cloudai/systems/slurm/slurm_command_gen_strategy.py
  • src/cloudai/workloads/ai_dynamo/slurm_command_gen_strategy.py
  • src/cloudai/workloads/nemo_launcher/slurm_command_gen_strategy.py
  • src/cloudai/workloads/nemo_run/slurm_command_gen_strategy.py
  • src/cloudai/workloads/triton_inference/slurm_command_gen_strategy.py
  • tests/systems/slurm/test_command_gen_strategy.py
  • tests/test_single_sbatch_runner.py
  • tests/workloads/ai_dynamo/test_command_gen_strategy_slurm.py
  • tests/workloads/nemo_launcher/test_command_gen_strategy_slurm.py
  • tests/workloads/nemo_run/test_command_gen_strategy_slurm.py
  • tests/workloads/triton_inference/test_command_gen_strategy_slurm.py

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Slurm node selection now applies configured exclusions in batch runners and workload command strategies. Tests verify filtered allocations, generated commands, and forwarded exclusion arguments.

Changes

Slurm node exclusion propagation

Layer / File(s) Summary
Shared Slurm selection updates
src/cloudai/systems/slurm/single_sbatch_runner.py, src/cloudai/systems/slurm/slurm_command_gen_strategy.py
Batch-level, per-test, and VBoost node resolution now passes configured excluded nodes to Slurm.
Workload node allocation updates
src/cloudai/workloads/ai_dynamo/..., src/cloudai/workloads/nemo_launcher/..., src/cloudai/workloads/nemo_run/..., src/cloudai/workloads/triton_inference/...
Workload strategies now exclude configured nodes when resolving allocations and node counts.
Exclusion behavior tests
tests/systems/slurm/..., tests/test_single_sbatch_runner.py, tests/workloads/*
Tests cover filtered node specifications, generated commands, cached allocations, and forwarded exclusion arguments.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 49d30

Configured Slurm node exclusions are applied across the affected allocation and command-generation paths. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: forwarding exclude_nodes to the remaining get_nodes_by_spec callers.
Description check ✅ Passed The description directly explains the exclude_nodes propagation, the affected call sites, the DeepEP exception, and the added regression tests.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.


Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Propagate exclude_nodes to all get_nodes_by_spec callers (nemo-run, nemo-launcher, single-sbatch-runner, and others)

1 participant