docs(tutorials): add KAI Scheduler + HAMi-core lab on nvml-mock - #722
docs(tutorials): add KAI Scheduler + HAMi-core lab on nvml-mock#722maishivamhoo123 wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: maishivamhoo123 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for project-hami ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reached
Next review available in: 57 seconds You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds an advanced tutorial for installing and validating KAI Scheduler, HAMi-core, and kai-resource-isolator on an nvml-mock-backed kind cluster. It covers whole-GPU scheduling, shared-GPU injection, known NVML limitations, cleanup, and sidebar registration. ChangesKAI Scheduler and HAMi lab
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant kind
participant nvml-mock
participant device-plugin
participant KAI Scheduler
participant kai-resource-isolator
participant Test Pod
kind->>nvml-mock: Deploy simulated GPU support
nvml-mock->>device-plugin: Provide GPU discovery
device-plugin->>KAI Scheduler: Publish allocatable GPU resources
Test Pod->>KAI Scheduler: Request whole GPU or gpu-memory
KAI Scheduler->>Test Pod: Bind the Pod to a GPU allocation
kai-resource-isolator->>Test Pod: Inject HAMi-core configuration
Test Pod-->>Test Pod: Report Running or NVML library failure
Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
tutorials/labs/kai-scheduler-hami.md (2)
49-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPin the Kubernetes version used by the lab.
The prerequisites constrain
kindandkubectl, butkind create clusterleaves the Kubernetes node image implicit. Different installations can produce different cluster versions and captured outputs. Add a testedkindest/nodeimage or document the exact Kubernetes version.
tutorials/labs/kai-scheduler-hami.md#L49-L60: pin the English lab cluster version.i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md#L50-L61: apply the same pin in the Chinese lab.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tutorials/labs/kai-scheduler-hami.md` around lines 49 - 60, Pin the kind Kubernetes node image in the cluster creation command to a tested kindest/node version, replacing the implicit default. Apply the same pin to the corresponding command in tutorials/labs/kai-scheduler-hami.md (lines 49-60) and i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md (lines 50-61); keep the existing NODE_NAME assignment unchanged.
128-149: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winDo not mutate or delete KAI's generated default queues.
KAI v0.17.0 creates
default-parent-queueanddefault-queueduring installation. This block creates another root, reparents the generated leaf, and later deletesdefault-queue. Use the generated queues, or create unique lab queues and clean up only those resources. (github.com)
tutorials/labs/kai-scheduler-hami.md#L128-L149: remove the manual default-queue mutation or use unique names.tutorials/labs/kai-scheduler-hami.md#L320-L320: do not delete KAI's generated queue in cleanup.i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md#L129-L150: apply the same queue change.i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md#L321-L321: do not delete KAI's generated queue in cleanup.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tutorials/labs/kai-scheduler-hami.md` around lines 128 - 149, Do not mutate or delete KAI-generated queues: in tutorials/labs/kai-scheduler-hami.md lines 128-149 and i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md lines 129-150, remove the manual default-queue setup or replace it with uniquely named lab queues; in both files’ cleanup lines 320 and 321, delete only resources created by the lab, not KAI’s generated default-queue.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tutorials/labs/kai-scheduler-hami.md`:
- Around line 298-303: The reservation Pod lookup is arbitrary and may select no
Pod or the wrong workload. In tutorials/labs/kai-scheduler-hami.md:298-303, wait
for the reservation Pod and select the Pod associated with
gpu-sharing-with-isolation using its owner, label, or exact BindingError name
before running kubectl logs; apply the same correlated selection in
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md:299-304.
- Line 292: Correct the GPU fraction arithmetic in both tutorials: update
tutorials/labs/kai-scheduler-hami.md lines 292-292 and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md
lines 293-293 so 20480 / 40960 is stated as 0.50; if retaining the reported 1.51
total, explain it through scheduler rounding or base-memory calculation rather
than the incorrect equation.
- Around line 97-100: Update the prerequisite lists in
tutorials/labs/kai-scheduler-hami.md at lines 49-52 and 97-100, and in
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md
at lines 50-53 and 98-101, to include NVCR/NGC access or document a mirrored
image for the NVIDIA device-plugin image used by the kubectl apply step. Keep
the English and Chinese prerequisite guidance consistent.
- Around line 121-153: Wait for KAI admission/webhook readiness after the Helm
install and before applying Queue resources in both
tutorials/labs/kai-scheduler-hami.md (lines 121-153) and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md
(lines 122-154). Add a readiness wait or retry loop that handles certificate and
webhook startup delays, while preserving the existing Queue manifests and
subsequent kubectl checks.
---
Nitpick comments:
In `@tutorials/labs/kai-scheduler-hami.md`:
- Around line 49-60: Pin the kind Kubernetes node image in the cluster creation
command to a tested kindest/node version, replacing the implicit default. Apply
the same pin to the corresponding command in
tutorials/labs/kai-scheduler-hami.md (lines 49-60) and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md
(lines 50-61); keep the existing NODE_NAME assignment unchanged.
- Around line 128-149: Do not mutate or delete KAI-generated queues: in
tutorials/labs/kai-scheduler-hami.md lines 128-149 and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.md
lines 129-150, remove the manual default-queue setup or replace it with uniquely
named lab queues; in both files’ cleanup lines 320 and 321, delete only
resources created by the lab, not KAI’s generated default-queue.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2455f650-913e-4d91-afae-78f83f06b565
📒 Files selected for processing (3)
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami.mdsidebars-tutorials.jstutorials/labs/kai-scheduler-hami.md
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
badda80 to
05fc746
Compare
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
This PR adds a new tutorial lab (Lab 11) that shows how to run NVIDIA KAI Scheduler with HAMi-core memory isolation on a local kind cluster using nvml-mock, so people can try the integration without a real GPU. It builds on the existing nvml-mock lab and walks through installing the NVIDIA device-plugin, KAI Scheduler with the hamicore plugin, queues, and kai-resource-isolator, then verifies whole-GPU scheduling, fractional GPU-memory accounting, and HAMi-core's ld.so.preload injection. It also contains where a fake GPU stops Every command was run and every output is a real capture (KAI v0.17.0, kai-resource-isolator 1.1.0-chart). Includes English and Chinese versions plus the sidebar and overview entries. This docs contain the whole logs which i got during my testing. https://docs.google.com/document/d/1IxAtURfCziGarAyD2avN6b5V3BqpdmwJUTUSBy2Tvxs/edit?usp=sharing
fix :- #721
Summary by CodeRabbit