Skip to content

fix(framework): count each Pod once in the Workload-Aware Scheduling gang size - #4412

Open
singhharsh1708 wants to merge 1 commit into
kubeflow:masterfrom
singhharsh1708:fix/was-gang-mincount
Open

singhharsh1708 wants to merge 1 commit into
kubeflow:masterfrom
singhharsh1708:fix/was-gang-mincount

Conversation

@singhharsh1708

Copy link
Copy Markdown

What this PR does / why we need it:

minCount in the Workload-Aware Scheduling plugin multiplied PodSet.Count by the ReplicatedJob replicas, but PodSet.Count is already the number of Pods across all replicas (core sets it to parallelism * replicas, and the JobSet plugin divides it by replicas). A multi-slice trainer with replicas: 4 and numNodes: 32 got a gang minCount of 128 for its 32 Pods, so the PodGroup was never admitted and the TrainJob stayed Pending.

This sums the PodSet counts as they are. The TestMinCount case that used a per-replica count now uses the total count, the TestWorkload sidecar case gets a count matching its 2 replicas, and a multi-slice case is added. All three fail on master.

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):

Fixes #4411

Checklist:

  • Docs included if any changes are user facing

Assisted-by: Claude, reviewed and tested by @singhharsh1708

…ng size

PodSet.Count is the number of Pods across all replicas of a ReplicatedJob:
core sets it to parallelism times replicas, and the JobSet plugin divides
it by replicas to get the per-Job parallelism. The Workload-Aware
Scheduling plugin multiplied it by replicas again, so a ReplicatedJob with
replicas above 1, such as a multi-slice TPU trainer, got a gang minCount
replicas times too large. The PodGroup waited for Pods that never exist
and the TrainJob stayed Pending.

Sum the PodSet counts as they are. The unit test that used a per-replica
count is updated, and a multi-slice case is added.

Assisted-by: Claude
Signed-off-by: singhharsh1708 <hs1663531@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 05:31
@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Trainer Nov 6, 2026
@google-oss-prow

Copy link
Copy Markdown
Contributor

[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 gaocegege for approval. For more information see the Kubernetes Code Review Process.

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

Details 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@singhharsh1708 singhharsh1708 changed the title fix(runtime): count each Pod once in the Workload-Aware Scheduling gang size fix(framework): count each Pod once in the Workload-Aware Scheduling gang size Nov 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

bug(runtime): Workload-Aware Scheduling gang minCount counts multi-slice Pods replicas times

2 participants