← Back to Pull requests

[AXT-153] kueue, kai_scheduler: Add scheduling goodput prototype #26012

Open
unknown opened this pull request with 511 lines diff across 6 files
View on GitHub
unknown unknown commented on Nov 12, 2026 15:26 UTC
Author

What does this PR do?

Adds an experimental, off-by-default collect_scheduling_goodput option to the Kueue and KAI Scheduler checks, per the design-doc scheduling goodput. Each run, every GPU workload adds elapsed time × requested GPUs (GPU-hours) to:

  • gpu.scheduling.badput_time: the workload waits to become fully runnable. Tagged with reason and the raw scheduler_reason.

  • gpu.scheduling.fully_admitted_time: admitted with all pods ready (Kueue), or all active pods running (KAI).
  • Goodput is fully_admitted / (fully_admitted + badput) at query time. The metrics have no integration prefix. One series per workload (kueue_workload / kai_pod_group), also tagged with job_scheduler, job_scheduler_queue, job_scheduler_workload and, when known, gpu_type.

    reason is one of six scheduler-independent categories: quota_or_capacity, placement_or_topology, configuration_or_request, preemption_or_reclaim, startup_or_system, other_or_unknown.

  • Kueue: fully admitted needs Admitted and PodsReady (waitForPodsReady); without it, nothing is submitted. Only the leader's instance submits.

  • KAI: reads each PodGroup's pods, and its Job when it has none. Enable on one instance only.

  • Works with collect_workload_events / collect_podgroup_events false, as when the Cluster Agent sends the events.

  • gpu_type (Kueue) comes from the flavors of the admitted Workload (nvidia.com/gpu.product node label), else from the pods' nodeSelector / nodeAffinity.

  • New RBAC: Kueue workloads and resourceflavors; KAI pods and jobs.
  • How you validated your changes

  • Unit tests for each design-doc scenario, plus 18 overlapping workloads whose series must sum correctly.

  • On kind (Kueue v0.18.0, KAI v0.18.6, fake GPUs), I reproduced the scenarios.

  • In Datadog, 18 overlapping Kueue workloads on two clusters sum correctly in every grouping (experiment).
  • Motivation

    Part of AXT-153. Events move to the Cluster Agent (datadog-agent #61005). Design doc.

    Checklist before requesting review

    <!--
    The pr-description validation (Run Validations) fails until every item below is ticked and
    the visible description (excluding HTML comments) is at most 3,000 characters. CI, the changelog,
    and the QA label have their own checks. Request review only once all checks pass:
    gh pr checks <PR> --repo DataDog/integrations-core --watch.
    -->

  • I self-reviewed the full diff, and this description matches the final change

  • <!--
    How to verify: run gh pr diff <PR> --repo DataDog/integrations-core, review every changed line,
    and compare the final diff with the description above.
    -->
  • Tests cover the change, or this description explains why none are needed

  • <!--
    How to verify: check the diff for relevant tests and run them as described in AGENTS.md.
    -->
  • Automated review comments, including Codex review, were addressed or answered

  • <!--
    How to verify: run gh api repos/DataDog/integrations-core/pulls/<PR>/comments and
    gh pr view <PR> --repo DataDog/integrations-core --json reviews,comments, then fix each
    finding or reply with the reason no change is needed.
    -->
  • I, the human author, understand this change, can explain it to reviewers, and believe it meets the repository standards

  • <!-- Coding agents: never tick this item. Only the human author may tick it. -->

    <!--
    QA label: PRs that only change code owned exclusively by @DataDog/agent-integrations (see
    .github/CODEOWNERS) always use qa/skip-qa, never qa/required.
    -->
    [AXT-153]: https://datadoghq.atlassian.net/browse/AXT-153?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 511 lines (+383 / -128) across 6 files Reviewer: martavicentenavarro Review duration: 27496m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.48) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 511 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.373
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #26012"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.6% (MEDIUM) · Higher = larger blast radius
    47.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 25.4% · Safe to merge
    25.4%