Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAX Integration Enhancement Proposal #2125

Merged

Conversation

sandipanpanda
Copy link
Contributor

Enhancement Proposal for integrating JAX with Kubeflow Training Operator for distributed training on Kubernetes

Ref:

/area gsoc

@sandipanpanda
Copy link
Contributor Author

@kannon92
Copy link

@andreyvelich @tenzen-y do we want to see about using JobSet here? API seems pretty simple so far and JobSet should be a quick drop in from what I see.

@andreyvelich
Copy link
Member

@andreyvelich @tenzen-y do we want to see about using JobSet here? API seems pretty simple so far and JobSet should be a quick drop in from what I see.

Yes, we will work with @sandipanpanda to refactor this proposal based on our discussion from this doc: https://docs.google.com/document/d/1bha8rB6_iPTi9rXjJMnKi-CLxfL7dwtmQCKH4N6dcsI/edit#heading=h.24ap79rbqoxl.
E.g. integrate Jax to Training Operator with JobSet and TrainJob.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9207133318

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 35.431%

Totals Coverage Status
Change from base Build 9179239826: 0.02%
Covered Lines: 4380
Relevant Lines: 12362

💛 - Coveralls

- **Mitigation**: Implement robust scheduling and resource management policies in the Training Operator.

## Design Details

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a corresponding table between all JAX environment variables and how to obtain OR configure the JAX parameters like this?

https://docs.google.com/document/d/1bha8rB6_iPTi9rXjJMnKi-CLxfL7dwtmQCKH4N6dcsI/edit#heading=h.d6pih1ui0ccr

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandipanpanda Is there any tables?

docs/proposals/jax-integration.md Outdated Show resolved Hide resolved
docs/proposals/jax-integration.md Outdated Show resolved Hide resolved
selector:
app: jaxjob-master-${job_id}
ports:
- port: 23456
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document the default port somewhere

docs/proposals/jax-integration.md Outdated Show resolved Hide resolved
docs/proposals/jax-integration.md Outdated Show resolved Hide resolved
docs/proposals/jax-integration.md Outdated Show resolved Hide resolved
@andreyvelich
Copy link
Member

@sandipanpanda We agreed that initially we can support Jax within existing Training Operator implementation given the time it takes for us to design and to implement TrainJob API with JobSet.
Once we implement TrainJob API in Training Operator, we will easily add support for Jax settings.
We are planning to implement TrainJob API in Q4 - Q1.

That will unblock @sandipanpanda with this work.
@sandipanpanda Feel free to finalize your GSoC proposal using the existing Training Operator assets.
cc @kubeflow/wg-training-leads

@sandipanpanda
Copy link
Contributor Author

Thanks! I have updated the proposal according to Kubeflow Proposal Document Structure. I am working on finalizing the proposal using the existing Training Operator assets.

@sandipanpanda
Copy link
Contributor Author

/cc @andreyvelich @tenzen-y PTAL

Copy link

@sandipanpanda: GitHub didn't allow me to request PR reviews from the following users: PTAL.

Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @andreyvelich @tenzen-y PTAL

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-sigs/prow repository.

@google-oss-prow google-oss-prow bot requested a review from tenzen-y July 9, 2024 15:33
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, could you mention about validations?
You can refer to the other framework validations like this: https://github.com/kubeflow/training-operator/blob/2b39d3cbc1525dc29eb40aa58b149dbeef00aa0f/pkg/webhooks/pytorch/pytorchjob_webhook.go

docs/proposals/jax-integration.md Outdated Show resolved Hide resolved
- **Mitigation**: Implement robust scheduling and resource management policies in the Training Operator.

## Design Details

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandipanpanda Is there any tables?

@sandipanpanda sandipanpanda force-pushed the jax-integration-proposal branch 3 times, most recently from 9c4c9bd to e3eaa99 Compare July 11, 2024 17:46
@sandipanpanda
Copy link
Contributor Author

@tenzen-y PTAL

@coveralls
Copy link

coveralls commented Jul 11, 2024

Pull Request Test Coverage Report for Build 9898700147

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 35.423%

Totals Coverage Status
Change from base Build 9896165546: 0.02%
Covered Lines: 4380
Relevant Lines: 12365

💛 - Coveralls

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise lgtm

docs/proposals/jax-integration.md Outdated Show resolved Hide resolved
Comment on lines 95 to 119
```yaml
apiVersion: kubeflow.org/v1
kind: JAXJob
metadata:
name: example-jaxjob
spec:
backend: "gloo"
coordinatorPort: "6666"
replicaSpecs:
- replicas: 1
ReplicaType: COORDINATOR
template:
spec:
containers:
- image: ghcr.io/kubeflow/jax:latest
name: coordinator
imagePullPolicy: IfNotPresent
restartPolicy: OnFailure
- replicas: 2
ReplicaType: WORKER
template:
spec:
containers:
- image: ghcr.io/kubeflow/jax:latest
name: worker
restartPolicy: OnFailure
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This YAML example is abandoned. So, could you refine this based on the latest API design?

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I never find validation design through this design.
Could you add which validations should we add?
For example, do we need to validate if the JaxJob has cordinator role?

Kubeflow Enhancement Proposal: Integrate JAX with Kubeflow Training Operator

Signed-off-by: Sandipan Panda <samparksandipan@gmail.com>
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit bcba864 into kubeflow:master Jul 12, 2024
39 checks passed
@sandipanpanda sandipanpanda deleted the jax-integration-proposal branch July 12, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants