Skip to content

Build the infrastructure graph from the existing sysinfo fan-out - #1088

Closed
anandhu-eng wants to merge 6 commits into
mainfrom
infragraph-multi-node-support
Closed

anandhu-eng wants to merge 6 commits into
mainfrom
infragraph-multi-node-support

Conversation

@anandhu-eng

Copy link
Copy Markdown
Contributor

Adds an infragraph infrastructure-graph layer on top of the multi-node system-info collection, without a second SSH pass for topology.

The topology rides along with the sysinfo that is already being collected per node:

  • get-lstopo gains --out_dir_path / --out_file_name so callers can put the XML somewhere predictable. Defaults are unchanged.

  • get-mlperf-single-node-system-info gains a _lstopo variation. It runs get,lstopo as a prehook dep -- the output directory is only resolved in preprocess(), so a plain dep would run too early -- and writes .lstopo.xml beside the JSON. That shared stem is the whole pairing contract, and it is what lets the multi-node script predict the remote filename it has to copy back.

  • get-mlperf-multi-node-system-info gains _infragraph, which appends _lstopo to the remote tags, adds the XML to files_to_copy_back, and runs the new generate-infograph script as a post_dep. post_deps run after postprocess(), so every node has reported in by then.

  • generate-infograph (new) merges the per-node topologies into one Infrastructure, annotates each node's cpu / xpu components from that node's sysinfo, and renders the HTML visualizer. It discovers the node pairs by globbing the input directory rather than being handed a node list, so it never has to agree with the caller on node numbering, and one node in yields a single-node graph while N yield a multi-node one through the same path. Structurally identical devices are stored once and instantiated per node; instances are named after each node's real hostname, with a suffix when two nodes report the same one.

_infragraph is opt-in: turning it on unconditionally would make hwloc and infragraph hard dependencies of a script that many callers already run. Without the tag, nothing about this change is reachable.

infragraph 3.x needs Python >= 3.10 (it uses PEP 604 annotations at import time, so on 3.9 it fails to import rather than to install). version_min on the python dep is ignored whenever an enclosing script already resolved MLC_PYTHON_BIN_WITH_PATH, so generate-infograph checks the selected interpreter in preprocess() and names the problem instead of letting it surface as a bare TypeError.

Tested with the local workstation as node 0 and a remote 8x H100 node as node 1: two-node, single-node, _exclude_current_node, homogeneous deduplication, standalone generate-infograph with _no_visualize, and a regression check confirming the default path produces no topology capture and no graph.

🧾 PR Checklist

📁 File Hygiene & Output Handling

  • No unintended files (e.g., logs, cache, temp files, pycache, output folders) are committed

📝 Comments & Communication

  • Proper inline comments are added to explain important or non-obvious changes
  • PR title and description clearly state what the PR does and why
  • Related issues (if any) are properly referenced (Fixes #, Related to #, etc.)

🛡️ Safety & Security

  • No secrets or credentials are committed
  • Paths, shell commands, and environment handling are safe and portable

Adds an infragraph infrastructure-graph layer on top of the multi-node
system-info collection, without a second SSH pass for topology.

The topology rides along with the sysinfo that is already being collected
per node:

- get-lstopo gains --out_dir_path / --out_file_name so callers can put the
  XML somewhere predictable. Defaults are unchanged.

- get-mlperf-single-node-system-info gains a _lstopo variation. It runs
  get,lstopo as a prehook dep -- the output directory is only resolved in
  preprocess(), so a plain dep would run too early -- and writes
  <sysinfo-stem>.lstopo.xml beside the JSON. That shared stem is the whole
  pairing contract, and it is what lets the multi-node script predict the
  remote filename it has to copy back.

- get-mlperf-multi-node-system-info gains _infragraph, which appends
  _lstopo to the remote tags, adds the XML to files_to_copy_back, and runs
  the new generate-infograph script as a post_dep. post_deps run after
  postprocess(), so every node has reported in by then.

- generate-infograph (new) merges the per-node topologies into one
  Infrastructure, annotates each node's cpu / xpu components from that
  node's sysinfo, and renders the HTML visualizer. It discovers the node
  pairs by globbing the input directory rather than being handed a node
  list, so it never has to agree with the caller on node numbering, and one
  node in yields a single-node graph while N yield a multi-node one through
  the same path. Structurally identical devices are stored once and
  instantiated per node; instances are named after each node's real
  hostname, with a suffix when two nodes report the same one.

_infragraph is opt-in: turning it on unconditionally would make hwloc and
infragraph hard dependencies of a script that many callers already run.
Without the tag, nothing about this change is reachable.

infragraph 3.x needs Python >= 3.10 (it uses PEP 604 annotations at import
time, so on 3.9 it fails to import rather than to install). version_min on
the python dep is ignored whenever an enclosing script already resolved
MLC_PYTHON_BIN_WITH_PATH, so generate-infograph checks the selected
interpreter in preprocess() and names the problem instead of letting it
surface as a bare TypeError.

Tested with the local workstation as node 0 and a remote 8x H100 node as
node 1: two-node, single-node, _exclude_current_node, homogeneous
deduplication, standalone generate-infograph with _no_visualize, and a
regression check confirming the default path produces no topology capture
and no graph.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@anandhu-eng
anandhu-eng requested a review from a team as a code owner September 3, 2026 06:51
@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

MLCommons CLA bot:
Thank you very much for your submission; we really appreciate it. Before we can accept your contribution,
we ask that you sign the MLCommons CLA (Apache 2). Please submit your GitHub ID to our onboarding form to initiate
authorization. If you are from a MLCommons member organization, we will request that you be added to the CLA.
If you are not from a member organization, we will email you a CLA to sign. For any questions, please contact
support@mlcommons.org.
2 out of 3 committers have signed the MLCommons CLA.
✅ @anandhu-eng
✅ @arjunsuresh
❌ @bumper97birch
You can retrigger this bot by commenting recheck in this Pull Request

@anandhu-eng anandhu-eng mentioned this pull request Sep 3, 2026
4 tasks done
Comment thread script/generate-infograph/meta.yaml Outdated
@@ -0,0 +1,61 @@
alias: generate-infograph

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any reason for calling this script as "infograph" instead of infragraph?
is it a typo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that @Amos-Rai-KEYS , it was a typo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I've been wondering about for a while - if I run the sysinfo script with _cuda as a variation, any node that doesn't have an NVIDIA GPU returns no json at all, not even CPU info. Is that known/expected behavior, or should it still collect the CPU details?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the automation encounters a system without a GPU runtime, it attempts to install it automatically. On CPU-only systems, the install script errors out and on the master node, the multi-node-system-info script logs the following error:

Error obtaining information from remote node {sshid}!

The multi-node-system-info script currently records this as an error but continues collecting information from the remaining nodes.

That's a good observation. We need to change the behaviour

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anandhu-eng 😀

@Amos-Rai-KEYS

Copy link
Copy Markdown
Contributor

Hi @anandhu-eng
apologies for delay, I have reviewed the PR and added some comments.

@Amos-Rai-KEYS

Copy link
Copy Markdown
Contributor

@anandhu-eng also I have tried this on my system and its working well for me.

@anandhu-eng

Copy link
Copy Markdown
Contributor Author

@anandhu-eng also I have tried this on my system and its working well for me.

Thats great, thank you @Amos-Rai-KEYS.

@anandhu-eng

Copy link
Copy Markdown
Contributor Author

Closing as the changes are merged through a different PR: #1124

@anandhu-eng anandhu-eng closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants