feat(runtimes): make MPI launcher depend on worker readiness#3685
feat(runtimes): make MPI launcher depend on worker readiness#3685Amir380-A wants to merge 12 commits into
Conversation
|
[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 |
|
🎉 Welcome to the Kubeflow Trainer! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
There was a problem hiding this comment.
Pull request overview
This PR updates the MPI-based ClusterTrainingRuntime definitions for DeepSpeed and MLX so the launcher replicated job is only created after the worker (“node”) replicated job reaches Ready, using JobSet’s dependsOn API. This directly addresses issue #2751 by preventing the launcher from starting (and failing) before MPI workers are ready to accept connections.
Changes:
- Reordered
replicatedJobssonodecomes beforelauncher(required because the first replicated job cannot usedependsOn). - Added
dependsOn: [{ name: node, status: Ready }]to thelauncherreplicated job for both DeepSpeed and MLX. - Updated Helm unittest assertions to reflect the new replicated job ordering and dependency.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| manifests/base/runtimes/mlx_distributed.yaml | Makes MLX launcher creation depend on node readiness via dependsOn. |
| manifests/base/runtimes/deepspeed_distributed.yaml | Makes DeepSpeed launcher creation depend on node readiness via dependsOn. |
| charts/kubeflow-trainer/templates/runtimes/mlx-distributed.yaml | Helm template update to emit the dependsOn relationship and new ordering. |
| charts/kubeflow-trainer/templates/runtimes/deepspeed-distributed.yaml | Helm template update to emit the dependsOn relationship and new ordering. |
| charts/kubeflow-trainer/tests/runtimes/mlx_distributed_test.yaml | Updates Helm unittest expectations for replicated job order and dependsOn. |
| charts/kubeflow-trainer/tests/runtimes/deepspeed_distributed_test.yaml | Updates Helm unittest expectations for replicated job order and dependsOn. |
|
/ok-to-test |
|
@Amir380-A: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
andreyvelich
left a comment
There was a problem hiding this comment.
Thank you for this @Amir380-A!
Please can you also update the Integration Test:
https://github.com/Amir380-A/trainer/blob/411c212a8a95c566678bda243a7c1927742f3b22/test/integration/controller/trainjob_controller_test.go#L1040
To ensure we have similar DependsOn configuration there.
/ok-to-test
/retest
402c2f9 to
6897f95
Compare
|
@Amir380-A Could you check why E2Es are failing please? |
|
/milestone v2.3 |
831e4ee to
92dc620
Compare
|
/retest |
8458216 to
d7eb6cb
Compare
09a48c1 to
92dc620
Compare
| securityContext: | ||
| fsGroup: 1000 |
There was a problem hiding this comment.
Why do you require to introduce Security Context as part of this PR?
I was able to run DeepSpeed runtime without it and with DependsOn on my local Kind cluster.
There was a problem hiding this comment.
I couldn't run DeepSpeed locally because of the massive size of the images required.
In GitHub Actions however, the DeepSpeed E2E was consistently failing with:
Unable to load host key: /home/mpiuser/.ssh/id_rsa
sshd: no hostkeys available -- exiting.
After adding the pod securityContext with fsGroup, the SSH key became readable by the container, sshd started successfully and the Helm E2E passed.
There was a problem hiding this comment.
I think, runAsGroup: 1000 might fail the E2Es.
Can you try to remove that alongside the securityContext? It should be working fine.
fdb70e4 to
7cb1e7c
Compare
|
/test E2E Tests / GPU E2E Test (1.33.1) (pull_request) |
|
@Amir380-A: No presubmit jobs available for kubeflow/trainer@master DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@Amir380-A: No presubmit jobs available for kubeflow/trainer@master DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
7cb1e7c to
5708d84
Compare
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
5708d84 to
8f57043
Compare
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
Signed-off-by: Amir380-A <62997533+Amir380-A@users.noreply.github.com>
What this PR does / why we need it:
This PR updates the MPI-based ClusterTrainingRuntimes (DeepSpeed and MLX) to ensure the launcher replicated job is created only after the node replicated job becomes Ready by using JobSet's
dependsOnAPI.Which issue(s) this PR fixes
Fixes #2751