docs: add lab 10 topology-aware scheduling tutorial#610
docs: add lab 10 topology-aware scheduling tutorial#610maishivamhoo123 wants to merge 5 commits into
Conversation
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
✅ 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: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds Lab 9 to the tutorials sidebar and introduces a 615-line guide for configuring nvml-mock and HAMi to demonstrate topology-aware multi-GPU and single-GPU scheduling on simulated GPUs. ChangesTopology-Aware Scheduling Lab
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: maishivamhoo123 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
tutorials/labs/topology-aware-scheduling.md (2)
20-20: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSplit imports into separate lines.
While technically valid in MDX 2, placing multiple import statements on the same line reduces readability. Consider splitting them.
🧹 Proposed format
-import Tabs from '`@theme/Tabs`'; import TabItem from '`@theme/TabItem`'; +import Tabs from '`@theme/Tabs`'; +import TabItem from '`@theme/TabItem`';🤖 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/topology-aware-scheduling.md` at line 20, Split the combined imports in the MDX file into separate lines, keeping the existing Tabs and TabItem imports unchanged and preserving their order.
485-486: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
kubectl waitinstead of manual watch. Both steps rely onkubectl get pod -w, which blocks the terminal and requires a manualCtrl+Cinterrupt (which isn't even mentioned in the single-GPU step). Replacing this withkubectl waitcreates a better, automation-friendly user experience.
tutorials/labs/topology-aware-scheduling.md#L485-L486: Replacekubectl get pod multi-gpu -wwithkubectl wait --for=condition=Ready pod/multi-gpu --timeout=60s.tutorials/labs/topology-aware-scheduling.md#L534-L535: Replacekubectl get pod single-gpu -wwithkubectl wait --for=condition=Ready pod/single-gpu --timeout=60s.🤖 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/topology-aware-scheduling.md` around lines 485 - 486, Replace the manual pod watch with kubectl wait using a 60-second timeout: update tutorials/labs/topology-aware-scheduling.md lines 485-486 for pod/multi-gpu and lines 534-535 for pod/single-gpu, preserving the subsequent annotation commands.sidebars-tutorials.js (1)
54-58: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFix indentation.
Align this block with the adjacent array items for consistent formatting (8 spaces instead of 10 for the opening brace).
🧹 Proposed format
- { - type: "doc", - id: "labs/topology-aware-scheduling", - customProps: { level: "Intermediate", duration: "about 45 minutes" }, - }, + { + type: "doc", + id: "labs/topology-aware-scheduling", + customProps: { level: "Intermediate", duration: "about 45 minutes" }, + },🤖 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 `@sidebars-tutorials.js` around lines 54 - 58, Adjust the indentation of the sidebar item block beginning with the object containing id "labs/topology-aware-scheduling" so its opening brace and contents align with adjacent array items, using 8 spaces for the opening brace.
🤖 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/topology-aware-scheduling.md`:
- Around line 452-454: Update both Pod YAML instructions in
tutorials/labs/topology-aware-scheduling.md: at lines 452-454, tell users to
create or save the snippet as multi-gpu-pod.yaml before applying it; at lines
501-503, tell users to create or save it as single-gpu-pod.yaml before applying
it.
- Line 615: Add a single trailing newline to the end of
tutorials/labs/topology-aware-scheduling.md, preserving all existing content,
and run the relevant markdownlint or repository health checks to confirm MD047
passes.
---
Nitpick comments:
In `@sidebars-tutorials.js`:
- Around line 54-58: Adjust the indentation of the sidebar item block beginning
with the object containing id "labs/topology-aware-scheduling" so its opening
brace and contents align with adjacent array items, using 8 spaces for the
opening brace.
In `@tutorials/labs/topology-aware-scheduling.md`:
- Line 20: Split the combined imports in the MDX file into separate lines,
keeping the existing Tabs and TabItem imports unchanged and preserving their
order.
- Around line 485-486: Replace the manual pod watch with kubectl wait using a
60-second timeout: update tutorials/labs/topology-aware-scheduling.md lines
485-486 for pod/multi-gpu and lines 534-535 for pod/single-gpu, preserving the
subsequent annotation commands.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ffda528-5b1a-4cba-8197-39305e35e66b
📒 Files selected for processing (2)
sidebars-tutorials.jstutorials/labs/topology-aware-scheduling.md
|
New changes are detected. LGTM label has been removed. |
547e688 to
6e7e560
Compare
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
6e7e560 to
1a8f060
Compare
|
@maishivamhoo123 can you change the lab number to 10, because there was another lab 9 in progress. #608 |
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
| { | ||
| "op": "add", | ||
| "path": "/spec/template/spec/containers/1/command/-", | ||
| "value": "--sgpu-topology-aware=true" |
There was a problem hiding this comment.
this flag does not exist on the hami scheduler, sgpu-topology-aware is a metax device plugin flag, unrelated to nvidia topology scoring?
| Apply the Pod: | ||
|
|
||
| ```bash | ||
| kubectl apply -f multi-gpu-pod.yaml |
There was a problem hiding this comment.
multi-gpu-pod.yaml is never created anywhere in this lab, so this command fails with file not found?
| Apply the Pod: | ||
|
|
||
| ```bash | ||
| kubectl apply -f single-gpu-pod.yaml |
There was a problem hiding this comment.
single-gpu-pod.yaml has the same problem, it is never created before this apply command?
| git clone https://github.com/Project-HAMi/HAMi.git | ||
| cd HAMi | ||
| git log --until=2026-07-14 --oneline -1 # should output 5dca58e | ||
| git checkout 5dca58e # or the commit hash you just got |
There was a problem hiding this comment.
this commit is from 2026-06-11, but git log --until=2026-07-14 on the real hami repo returns a different, newer commit from 2026-07-13?
|
this lab has no chinese translation, every other lab in this repo has one under i18n/zh. |

This tutorial provides a simple, step-by-step guide to testing HAMi’s smart GPU scheduling system on a regular computer without needing any real, expensive graphics cards. Inside, it contains instructions on how to simulate eight fake A100 GPUs and trick the system into thinking one specific GPU has a very poor network connection. It then shows you how to verify that the scheduler is smart enough to save the best-connected slots for heavy workloads while pushing single-GPU tasks onto the isolated one. This is incredibly useful because it allows developers and users to test and optimize their cluster setup completely for free, making it easy to catch bugs and automate tests before moving to real, expensive hardware.
Closes : #609
Summary by CodeRabbit