fix(slurm): close one-node M2 integration - #929
Conversation
Greptile SummaryThe PR completes the one-node Slurm M2 runtime by moving orchestration into a packaged Bash controller and sealed container phases.
|
| Filename | Overview |
|---|---|
| packages/data-designer-slurm/src/data_designer/slurm/runtime/ports.py | Remaps planned ports into deterministic allocation-local blocks derived from assigned GRES GPUs. |
| packages/data-designer-slurm/src/data_designer/slurm/client/execution.py | Translates mounted paths and validates model endpoints against the allocation-remapped plan. |
| packages/data-designer-slurm/src/data_designer/slurm/runtime/bootstrap.py | Builds typed sealed-container steps with scoped secrets and allocation GPU metadata. |
| packages/data-designer-slurm/src/data_designer/slurm/runtime/entrypoint.py | Publishes client candidates before atomically validating and finalizing the winning attempt. |
| packages/data-designer-slurm/src/data_designer/slurm/runtime/context.py | Validates container-visible paths while retaining canonical host paths in allocation state. |
| packages/data-designer-slurm/src/data_designer/slurm/runtime/entrypoint.sh | Coordinates preflight, serving readiness, generation, cleanup, and terminal phases under Bash 4.3. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
Submit[Persist run and held attempt] --> Release[Release Slurm job]
Release --> Bash[Bash allocation controller]
Bash --> Prepare[Sealed client prepare phase]
Prepare --> Preflight[Client preflight]
Preflight --> Servers[Start serving containers]
Servers --> Ready[Readiness checks]
Ready --> Client[Run generation client]
Client --> Candidate[Publish candidate result]
Candidate --> Finalize[Validate and publish winner]
Finalize --> Cleanup[Stop steps and finalize allocation]
Reviews (14): Last reviewed commit: "fix(slurm): validate allocation-local en..." | Re-trigger Greptile
|
Thanks for putting this together, @andreatnvidia — this is a substantial step toward closing the one-node M2 path. SummaryThe change follows the stated direction: it moves host orchestration to Bash, runs Python only inside the sealed images, stages a digest-bound runtime bundle, and persists attempts before releasing held Slurm work. I confirmed the three existing P1 inline findings and have not repeated them below; they are valid merge blockers. FindingsCritical — Let's fix these before merge
What Looks Good
Residual RiskThe focused runtime/launcher/service/state suite passed locally (289 tests). The full Slurm suite reached 1,308 passing tests; the remaining package-entry-point test could not discover VerdictNeeds changes. Please resolve the three existing P1 threads and make the success/winner transition recoverable in the still-exported Python controller as well. After those state and path invariants are fixed, the overall implementation shape looks sound. This review was generated by an AI assistant. |
|
Thanks for the quick follow-up, @andreatnvidia — the new commit closes several of the concrete integration gaps from the first pass. SummaryI re-reviewed the new head rather than carrying the earlier verdict forward. The container-path handling and partial-submission compensation are now materially better, and success/winner publication has been centralized in the state finalizer. Greptile has already captured the separate client-command blocker on this head, so I have not duplicated it below. FindingsCritical — Let's fix this before merge
What Looks Good
Residual RiskThe full Slurm suite reached 1,314 passing tests; its only failure was the package-entry-point check because this isolated review worktree is not installed as VerdictNeeds changes. The new head addresses the earlier path and catchable-exception recovery issues, but the separate successful-attempt and winner writes remain non-atomic across process or node loss. The existing Greptile blocker on this head also remains outstanding. This review was generated by an AI assistant. |
|
Thanks, @nabinchha. We also completed a full one-node model-serving smoke through readiness, record generation, and winner publication. I’ll address the remaining review points and run a few more end-to-end smokes before merge. |
|
Thanks, @nabinchha. I missed your second review earlier. |
|
Thanks for the follow-up, @andreatnvidia — the new head fixes both the unsupported client arguments and the process-death window from my previous review. I also verified that the full Slurm test suite now passes locally. SummaryThe recovery path is now restartable: a fresh writer can detect a successful attempt without a winner and complete publication during status reconciliation. The host/container path work also handles a non-identity workspace mount in the common single-mount case. One supported mount-layout edge case still loses the plan's most-specific mapping, though, so I don't think this head is ready to merge yet. FindingsWarning — Please fix before merge
What Looks Good
Verification
VerdictNeeds changes. The prior blockers are fixed, but state-side path resolution still diverges from the runtime's documented most-specific mount behavior for nested mounts. This review was generated by an AI assistant. |
|
Thanks for the careful follow-through, @andreatnvidia — the latest fixes close the remaining mount and runtime-path gaps cleanly. SummaryThis head now applies the resolved plan's most-specific mount mapping consistently across state finalization, client bootstrap artifacts, attempt-local overlays, and absolute serving-model paths. It also aligns the Bash and Python GPU preflight checks so exclusive allocations with extra visible GPUs are accepted as intended. FindingsNo new findings. The previous nested-mount warning and the existing GPU/dependency-path inline findings are resolved on this head. What Looks Good
Residual RiskLocal validation cannot reproduce the real Slurm/Pyxis environment. The exact head should still receive the intended sealed-image cluster smoke, especially for the newly mapped absolute model path. VerdictShip it. The reviewed blockers are addressed, the implementation matches the PR's one-node M2 integration goal, and the current Slurm test suite passes locally. This review was generated by an AI assistant. |
nabinchha
left a comment
There was a problem hiding this comment.
Thanks for the quick follow-up, @andreatnvidia — the GPU-owned port blocks close the shared-node collision identified on the previous head.
Summary
This revision keeps visible-GPU allocations exclusive while allowing GRES allocations to share a node, and maps each GRES allocation's runtime service claims into a deterministic 256-port block owned by its lowest allocated global GPU ID. The scheduler environment is carried consistently through preflight, bootstrap, entrypoint, and the exported controller path.
Findings
No merge-blocking findings on this head. The previous shared-node service-port P1 is resolved.
What Looks Good
- GPU 0 and GPU 1 receive disjoint service-port blocks, so independently submitted jobs sharing a node cannot select the same remapped runtime ports.
- Visible-GPU profiles retain
#SBATCH --exclusive, preserving the contract for profiles where the scheduler cannot provide a stable GRES allocation identity. - Invalid or missing
SLURM_JOB_GPUSvalues fail preflight instead of silently falling back to a collision-prone identity. - The new environment plumbing and remapped deployment selection are covered across the Python and Bash runtime paths.
Verification
- Full Slurm suite: 1,336 passed.
- Ruff and formatting checks pass for the changed Python files.
- GitHub reports the PR mergeable with all current required checks green; Greptile also completed successfully on this exact head.
Residual Risk
An explicitly configured OTEL metrics port is not remapped into the GPU-owned block. Two opt-in jobs choosing the same metrics port can cause one exporter to disable metrics, but that bind failure is deliberately non-fatal and Slurm defaults telemetry to disabled, so I do not consider it a merge blocker. A real shared-node Slurm/Pyxis smoke remains the best integration validation.
Verdict
Approved. The current head is good to merge.
This review was generated by an AI assistant.
|
@nabinchha, final smoke update: we completed end-to-end sealed-image serving for a single GPU, concurrent shards, and two simultaneous one-GPU tasks sharing a node. We also exercised interrupted winner publication, cancellation reconciliation, and nested mount layouts. The resulting fixes cover restartable winner publication, consistent client and mount-path handling, partial-GPU scheduling without whole-node reservation, and deterministic GPU-owned service ports. The final runs published winners and produced the expected outputs. Could you take one final look at |
|
Thanks for the final pass, @andreatnvidia — carrying the allocation identity into the sealed client closes the last port-validation mismatch cleanly. SummaryThe current head makes client preflight reconstruct the same allocation-local plan used to build the runtime endpoints, with FindingsNo findings. What Looks Good
Verification
Residual RiskI could not independently reproduce the real Slurm/Pyxis environment locally. Andre reports successful sealed-image smokes covering a single GPU, concurrent shards, two simultaneous one-GPU tasks sharing a node, interrupted winner publication, cancellation reconciliation, and nested mounts. VerdictShip it. The current head is ready to merge. This review was generated by an AI assistant. |
Layer multi-node topology and follower-failure handling onto the production allocation bootstrap introduced by #929. Preserve the one-node path while adding host-scoped steps, coordinated node workers, remote readiness probes, and distributed preflight coverage. Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
Layer multi-node topology and follower-failure handling onto the production allocation bootstrap introduced by #929. Preserve the one-node path while adding host-scoped steps, coordinated node workers, remote readiness probes, and distributed preflight coverage. Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
Summary
Validation
.venv/bin/ruff check --fix . && .venv/bin/ruff format .make check-slurm.venv/bin/pytest -q packages/data-designer-slurm/tests- 1309 passedmake build-slurmmake test-slurm-wheel-installLanding order
Land this integration prerequisite first. Then:
Part of #868
Part of #874