Repository navigation
Conversation
Let one MPI TrainJob run several node groups, each a replicatedJob with its own Pod template, number of nodes and slots, so a single job can mix CPU only, NVIDIA and AMD nodes. The runtime declares mlPolicy.mpi.launcher and mlPolicy.mpi.nodeGroups by name, and the TrainJob tunes them with spec.trainer.launcher and spec.trainer.nodeGroups, which share one schema and apply only to the MPI container of each group. Groups with numNodes 0 are removed from the JobSet with the references to them, every group gets its own hostfile lines and slots, and the launcher is found by jobName instead of the trainjob-ancestor-step label. Runtimes without the new fields keep their behaviour. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Reference implementation of KEP-4064 (#4145), opened as a draft so the KEP discussion can look at working code, and so we can deploy and test it on our clusters at CERN. An MPI runtime declares
mlPolicy.mpi.launcherandmlPolicy.mpi.nodeGroups, and a TrainJob sets the size, slots, image, command, args, env and resources of each group withspec.trainer.launcherandspec.trainer.nodeGroups. Runtimes without the new fields keep today's behaviour.Groups with
numNodes: 0are removed from the JobSet together with thedependsOn,successPolicyandfailurePolicyentries that reference them, every group gets its own hostfile lines and slots, with the GPU fallback applied per group, and the launcher is found byjobName, so these runtimes reject thetrainjob-ancestor-steplabel. Where the code differs from the KEP, for examplelauncherbeing a struct andcontainerNamea string as the Kube API Linter requires, I will update the KEP.Tested with unit tests in the touched packages and with webhook and controller integration tests on envtest 1.37, which also run the new CEL rules.
Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...format, will close the issue(s) when PR gets merged):Part of #4064
Checklist: