← Back to Pull requests

docs(scheduler): document per-pod scoring weights #759

Closed
unknown closed this pull request without merging on Sep 14, 2026 07:23 UTC
View on GitHub
unknown unknown commented on Aug 11, 2026 13:15 UTC
Author

What type of PR is this?
/kind documentation

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
-->

What this PR does / why we need it:

Documents the per-Pod device-scoring weights introduced by Project-HAMi/HAMi#2469.

This update:

  • documents the hami.io/device-scoring-weights annotation

  • explains defaults, admission-webhook rejection of invalid annotations, and scheduler-side validation

  • provides a complete Pod manifest

  • documents the weighted slot/core/memory formula

  • includes a checked example showing how weights affect device selection

  • clarifies interaction with binpack, spread, topology, mutex, capacity checks, and vendor-specific Fit behavior

  • updates the existing default GPU scoring examples to include virtual-device slot utilisation
  • Project-HAMi/HAMi#2469 and its admission-validation follow-up Project-HAMi/HAMi#2827 are merged.

    Which issue(s) this PR fixes:

    Fixes #758

    The corresponding Chinese documentation is included in this PR.

    Checklist:

  • npm run lint and npm run format:check pass

  • npm run build succeeds for both en and zh

  • Chinese translation updated if English docs changed (or noted why not)

  • Commits are signed off (git commit -s)
  • AI Disclosure:
    Codex was used to cross-check the implementation semantics and calculations, and to help draft the documentation. I reviewed and verified the final content and test results.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Documentation

  • Documented configurable GPU device-scoring weights for virtual-device slots, cores, and memory utilization.

  • Added annotation format, default values, validation requirements, and scoring examples.

  • Clarified that invalid configurations prevent scheduling until corrected, including admission webhook behavior.

  • Updated GPU binpack and spread formulas to include virtual-device slot utilization.

  • Confirmed that existing fit and topology constraints take precedence.

  • Added corresponding guidance in English and Chinese documentation.

  • <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 280 lines (+210 / -70) across 3 files Reviewer: blackdragoon26 Review duration: 48607m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 280 lines diff across 3 files
    0.40
    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.337
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #759"
    general weight: 0.35
    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: 39.6% (MEDIUM) · Higher = larger blast radius
    39.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: 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: 15.7% · Safe to merge
    15.7%