[CRCR] Compute nightly summary stats from matrix data instead of raw array - #8696
Open
subinz1 wants to merge 2 commits into
Open
[CRCR] Compute nightly summary stats from matrix data instead of raw array#8696subinz1 wants to merge 2 commits into
subinz1 wants to merge 2 commits into
Conversation
The nightly summary cards (Total Jobs, Failures, Pass Rate) were computed from the flat data array, while the table groups jobs by SHA and keeps only the latest run_attempt per (sha, job_name). When multiple run_ids target the same SHA (e.g. re-triggers), the summary counted all jobs individually but the table collapsed them into one row — producing a mismatch between the reported totals and the visible cells. Now NightlySummaryCards receives the matrix rows (post SHA-grouping and dedup) and iterates over the visible jobs, ensuring the cards always match the table. Ref #8691
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
3 tasks
|
torchci preview for Pushing to this PR clears |
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the discrepancy between the nightly summary cards (Total Jobs, Failures) and the table reported in #8691.
Root cause:
NightlySummaryCardscomputed stats from the rawdataarray (all individual job records), while the table usesbuildNightlyMatrix()which groups jobs bypytorch_head_shaand keeps only the latestrun_attemptper(sha, job_name). When multiplerun_ids target the same SHA (e.g., nightly re-triggers), the summary counted all jobs individually but the table collapsed them into one row — so "Total Jobs 42" in the card while only 35 cells were visible.Fix: Change
NightlySummaryCardsto accept the matrix rows (post SHA-grouping and dedup) and iterate overrow.jobs.values()to compute stats. This ensures the cards count exactly the jobs visible in the table.Before:
NightlySummaryCards({ data: CrcrJobRow[] })— flat array, counts duplicatesAfter:
NightlySummaryCards({ rows: NightlyRow[] })— matrix rows, matches tableCompanion to #8695 (which fixes partial rows at the time-window boundary).
Ref #8691
Test plan
Fixes #8691 (partial — companion: #8695)