Skip to content

fix: deduplicate graph breaks in tlparse summary#182

Open
TheChyeahhh wants to merge 1 commit into
meta-pytorch:mainfrom
TheChyeahhh:fix/tlparse-distinct-breaks
Open

fix: deduplicate graph breaks in tlparse summary#182
TheChyeahhh wants to merge 1 commit into
meta-pytorch:mainfrom
TheChyeahhh:fix/tlparse-distinct-breaks

Conversation

@TheChyeahhh
Copy link
Copy Markdown

@TheChyeahhh TheChyeahhh commented May 29, 2026

Summary

Adds a Distinct Graph Breaks section to the tlparse HTML index page that shows each unique graph break reason only once, removing duplicate entries that make it hard for end users to identify which graph breaks need fixing.

Problem

Previously, tlparse listed every graph break occurrence including duplicates in the Failures and Restarts section. Users had to manually sift through repeated identical break reasons to understand what actually needs fixing.

Solution

This change collects distinct graph break reasons from restart entries (using deduplication via Vec::contains) and displays them in a new dedicated 'Distinct Graph Breaks' section at the top of the index page. The existing Failures and Restarts section is preserved unchanged for detailed inspection.

Changes

  • src/lib.rs: Added distinct_graph_breaks collection with deduplication logic
  • src/types.rs: Added distinct_graph_breaks and has_distinct_graph_breaks fields to IndexContext
  • src/templates.rs: Added template section for rendering the distinct graph breaks summary

Fixes pytorch/pytorch#153669

Test Plan

  • cargo check passes
  • The change is purely additive - no existing functionality is modified

PR authored with AI assistant.

Adds a 'Distinct Graph Breaks' section to the tlparse HTML index that
shows each unique graph break reason only once, removing duplicate entries
that make it hard for end users to identify which graph breaks need fixing.

Previously, tlparse listed every graph break occurrence including duplicates
in the Failures and Restarts section. This change collects distinct graph
break reasons from restart entries and displays them in a new dedicated
section at the top of the index page.

Fixes pytorch/pytorch#153669

Test Plan:
- Verified with cargo check (no compilation errors)
- The change only affects the HTML output of tlparse; existing
  Failures and Restarts section is preserved unchanged.

PR authored with AI assistant.
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 29, 2026

Hi @TheChyeahhh!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla Bot added the cla signed label May 29, 2026
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 29, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make tlparse able to show a summary of distinct graph breaks

1 participant