Skip to content

Update HolisticTraceAnalysis dependency to the traceinsight package#217

Open
tejadhith wants to merge 1 commit into
mlcommons:mainfrom
tejadhith:update-hta-dependency
Open

Update HolisticTraceAnalysis dependency to the traceinsight package#217
tejadhith wants to merge 1 commit into
mlcommons:mainfrom
tejadhith:update-hta-dependency

Conversation

@tejadhith

Copy link
Copy Markdown

Summary

Chakra pins HolisticTraceAnalysis (HTA) to git commit d731cc2e in pyproject.toml, in both CI workflows (python_tests, end_to_end_tests), and in USER_GUIDE.md. That mid-2024 checkpoint predates HTA's pandas-2.x compatibility fix (HTA PR #333), so running chakra_trace_link on a real trace logs Critical path analysis encountered an invalid graph structure: Cannot specify both 'axis' and 'index'/'columns' and silently skips critical-path analysis.

HTA now publishes its releases to PyPI under the renamed distribution traceinsight (0.6.0 / 0.6.1); the importable module remains hta, so no source changes are needed. This PR replaces the pinned git checkout with the traceinsight package across pyproject.toml, both CI workflows, and USER_GUIDE.md — which also removes the manual clone/submodule/editable-install step from CI.

Test Plan

Environment: Python 3.13, torch 2.9.0+cu128, 2× V100; traceinsight 0.6.1, PARAM et_replay, networkx 3.6.1.

  • Unit suite: python -m pytest tests117 passed (no regression).
  • End-to-end, single-rank MLP: chakra_trace_link
    • before (HTA 0.5.0): Cannot specify both 'axis' and 'index'/'columns', critical path skipped.
    • after (traceinsight 0.6.1): calculating critical path took 0.0027s, Linking process successful; chakra_converter → valid .et (115 COMP_NODE).
  • End-to-end, 2-rank DDP/NCCL: link + convert succeed; .et = 154 COMP_NODE + 1 METADATA_NODE + 2 COMM_COLL_NODE (ncclDevKernel_AllReduce_…); critical path runs. No regression on comm-heavy traces.
  • import hta still resolves (module name unchanged in traceinsight 0.6.x).

Additional Notes

  • HTA's PyPI distribution was renamed HolisticTraceAnalysistraceinsight at 0.6.x; the importable module stays hta. traceinsight only exists at 0.6.0+, so a bare requirement cannot resolve below the fix.
  • No networkx change: the DiGraph.__new__ crash was specific to networkx 3.6.0 (networkx #8367) and is fixed in 3.6.1; nothing forces 3.6.0.
  • A new mlc-chakra PyPI release is needed to propagate this to pip install mlc-chakra users.
  • Refs: HTA PR #333 (pandas 2.x fix), networkx #8367.

@tejadhith tejadhith requested a review from a team as a code owner July 7, 2026 17:37
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@jinsun-yoo jinsun-yoo left a comment

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.

Thank you for the work. As a sanity check, coud you run the MLA conversion once more using the old version dependencies (networkx before 3.2.0, etc.), so that the generated Chakra graph stays the same before & after this change?

git submodule update --init
pip install -r requirements.txt
pip install -e .
pip install traceinsight

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.

Since this is now fixed to be a one-liner and is now represented in the requirements list in pyproject, perhaps we can remove this 'run item' altogether

Comment on lines 29 to +31
- name: Install HTA
run: |
git clone https://github.com/facebookresearch/HolisticTraceAnalysis.git
cd HolisticTraceAnalysis
git checkout d731cc2e2249976c97129d409a83bd53d93051f6
git submodule update --init
pip install -r requirements.txt
pip install -e .
pip install traceinsight

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.

ibid

Comment thread USER_GUIDE.md

### Step 4: Install Holistic Trace Analysis
Installing Holistic Trace Analysis is necessary for Trace link.
Installing Holistic Trace Analysis (published on PyPI as `traceinsight`) is necessary for Trace link.

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.

Let's clarify: "published on PyPI as traceinsight - the old PyPi name HolisticTraceAnalysis is no longer valid"

Comment thread USER_GUIDE.md
@@ -36,15 +36,10 @@ $ pip install .
```

### Step 4: Install Holistic Trace Analysis

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.

Actually, similar to above comments, just remove this?

Comment thread pyproject.toml
"networkx",
"pydot",
"HolisticTraceAnalysis @ git+https://github.com/facebookresearch/HolisticTraceAnalysis.git@d731cc2e2249976c97129d409a83bd53d93051f6"
"traceinsight"

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.

Let's add a comment here clarifying this is HTA

Comment thread pyproject.toml
@@ -19,7 +19,7 @@ dependencies = [
"graphviz",
"networkx",

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.

should we add >=3.6.1?

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.

2 participants