← Back to Pull requests

Add KAI Scheduler experimental feature #3691

Closed
unknown closed this pull request without merging on Nov 04, 2026 17:32 UTC
View on GitHub
unknown unknown commented on Oct 29, 2026 12:26 UTC
Author

What does this PR do?

Adds experimental KAI Scheduler support, enabled with the agent.datadoghq.com/kai-scheduler-enabled: "true" annotation (no CRD change, see docs/kai_scheduler.md):

  • With Cluster Agent 7.86+: enables KAI PodGroup collection in the Cluster Agent (DD_CLUSTER_AGENT_KAI_SCHEDULER_ENABLED), which tags pods with their KAI workload and queue, and grants it list/watch on podgroups.scheduling.run.ai.

  • With features.gpu.enabled and Agent 7.86+: sets DD_GPU_KAI_SCHEDULER_ENABLED on the node Agent, which maps KAI fractional GPUs to the containers using them.
  • Motivation

    Jira: AXT-139

    Using the KAI Scheduler support today means adding the Cluster Agent env var and writing the PodGroup RBAC by hand. Behind an annotation while in preview, like Kueue (#3711).

    Additional Notes

  • No check configuration: the kai_scheduler check scrapes plain HTTP Services, needs no RBAC, and is configured as a cluster check (see its README).
  • Minimum Agent Versions

    Agent: v7.86.0
    Cluster Agent: v7.86.0

    Describe your test plan

    Unit tests added: annotation absent or not true, Cluster Agent too old, prerelease image, node Agent too old, with and without GPU monitoring.

    Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies

  • PR has a milestone or the qa/skip-qa label

  • All commits are signed (see: [signing commits][1])
  • [1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

    [AXT-139]: https://datadoghq.atlassian.net/browse/AXT-139?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 222 lines (+166 / -56) across 2 files Reviewer: levan-m Review duration: 8945m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 222 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.323
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3691"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 36.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 14.5% · Safe to merge
    14.5%