8000 KEP-2628: Support KAI Scheduler in Kubeflow Trainer by Harshal292004 · Pull Request #2663 · kubeflow/trainer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

KEP-2628: Support KAI Scheduler in Kubeflow Trainer #2663

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Harshal292004
Copy link
Contributor
@Harshal292004 Harshal292004 commented Jun 8, 2025

This is the Kubeflow Enhancement Proposal for supporting KAI Scheduler in Kubeflow Trainer V2:

Related: #2628

Any suggestions or feedback are welcome !
@romanbaron @kannon92
/cc @andreyvelich @tenzen-y @Electronic-Waste

Signed-off-by: Harshal292004 <malaniharshal95@gmail.com>
Copy link

@Harshal292004: GitHub didn't allow me to request PR reviews from the following users: romanbaron, kannon92.

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

In response to this:

This is the Kubeflow Enhancement Proposal for supporting KAI Scheduler in Kubeflow Trainer V2:

Related: #2628

Any suggestions or feedback are welcome !

/cc @andreyvelich @tenzen-y @Electronic-Waste @romanbaron @kannon92

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.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign electronic-waste for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@coveralls
Copy link
coveralls commented Jun 8, 2025

Pull Request Test Coverage Report for Build 15726042285

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 29.19%

Totals Coverage Status
Change from base Build 15579727901: 0.0%
Covered Lines: 897
Relevant Lines: 3073

💛 - Coveralls

Signed-off-by: Harshal292004 <malaniharshal95@gmail.com>
@@ -0,0 +1,89 @@
# KEP-2628: Support KAI Scheduler in Kubeflow Trainer

This KEP proposes integrating NVIDIA's KAI Scheduler into Kubeflow Trainer V2 to enable gang-scheduling capabilities for TrainJob resources, extending the existing PodGroupPolicy API to support KAI alongside current schedulers like Co-Scheduling. The integration will leverage KAI's PodGrouper service to create scheduling queues and apply appropriate labels for efficient resource allocation in AI workloads.
Copy link
@romanbaron romanbaron Jun 9, 2025

Choose a reason for hiding this comment

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

Small comment here: PodGrouper Service will create the podGroup object, queues will have to be created by a different entity, probably by a trainer plugin.
This point is perfectly explained below so the rest is accurate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have resolved this , you may have a look @romanbaron

}

type KAIConfig struct {
Queue string `json:"queue,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

This is going to be really confusing to someone who uses KAI + Kueue.

cc @romanbaron.

Is there anyway to use gang scheduling in KAI without needing a KAI queue?

Volcano is used for PodGroup functionality in Trainer but I don't think one has to use Volcano Queues to use this.

Choose a reason for hiding this comment

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

Each KAI PodGroup must reference a designated KAI scheduling queue to clarify which queue’s resources are allocated to it.

One approach to integrating KAI with Kueue is to configure a single, unlimited queue for KAI, allowing Kueue to govern resources and dispatch workloads. Under this model, KAI schedules only the workloads that have been dispatched (i.e., pods are created and ungated), while fairness enforcement remains outside its scope.

@kannon92 - does it sounds like a possible solution? If not, we can discuss the possible options further.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that makes sense to me.

Harshal292004 and others added 2 commits June 15, 2025 20:40
Signed-off-by: Harshal292004 <malaniharshal95@gmail.com>

Choose a reason for hiding this comment

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

@Harshal292004, starting from v0.6.0 release KAI-Scheduler uses a different label key for queue, now it is kai.scheduler/queue instead of runai/queue.
Some more details are available here:
https://github.com/NVIDIA/KAI-Scheduler/tree/main/docs/migrationguides/v0.6.0#scheduling-queue-label-key
I think it will be best to align to the new version from now on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it

Signed-off-by: Harshal292004 <malaniharshal95@gmail.com>
@Harshal292004 Harshal292004 requested a review from romanbaron June 18, 2025 06:58
@Harshal292004
Copy link
Contributor Author

@romanbaron Does this make sense ?:

type PodGroupPolicySource struct {
	Coscheduling  *CoschedulingPodGroupPolicySource  `json:"coscheduling,omitempty"`
	Kaischeduling *KaischedulingPodGroupPolicySource `json:"kaischeduling,omitempty"`
}

type KaischedulingPodGroupPolicySource struct {
	MinMember         *int32  `json:"minMember,omitempty"`
	Queue             *string `json:"queue,omitempty"`
	PriorityClassName *string `json:"priorityClassName,omitempty"`
	MarkUnschedulable *bool   `json:"markUnschedulable,omitempty"`
	SchedulingBackoff *int32  `json:"schedulingBackoff,omitempty"`
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0