[Grafana][PyTorch DevX] Fix viable/strict lag panel#645
Merged
Conversation
jathu
commented
May 27, 2026
8fdb29a to
328e755
Compare
Contributor
|
Are the changes currently reflected in the cited test dashboards and would it be possible to see a before and after of the charts? I'm wondering if it's reasonable to see a sawtooth pattern here, and I also remember we had a somewhat prolonged viable/strict divergence on 3/20 for more than 4 days. |
jeanschmidt
requested changes
May 27, 2026
328e755 to
be48b08
Compare
be48b08 to
cbdb29c
Compare
jeanschmidt
approved these changes
May 27, 2026
georgehong
approved these changes
May 27, 2026
Contributor
|
@claude check if this is a similar query is used on test-infra https://github.com/pytorch/test-infra/blob/main/torchci/clickhouse_queries/strict_lag_sec/query.sql |
Contributor
|
Oh darn, we don't have claude bot here yet I think |
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.
Why the previous panel was wrong
The previous panel never actually compared viable/strict to main. It looked at push events on viable/strict and computed the gap between the push event time and the oldest commit it included. Specifically "how long the oldest commit included in each push had been sitting around before the push event fired". It has no relationship to how far behind main viable/strict is.
What the new query does
The new query measures the intended metric: each time viable/strict is updated, how many minutes behind main is its new head commit.
How it works:
viableCTE: every push event to refs/heads/viable/strict with its head commit's timestamp.mainCTE: every push event to refs/heads/main with its head commit's timestamp.ASOF LEFT JOIN main m ON v.pushed_ts >= m.pushed_tspairs each viable/strict push with the most recent main push at-or-before it — i.e., the state of main at the moment viable/strict was bumped.lag_minutes = (m.commit_ts − v.commit_ts) / 60— minutes between the two head commits' authoring times.Test Plan: dashboard
Pushed to my test folder: https://pytorchci.grafana.net/dashboards/f/flrhzs
Test Plan: sanity check against pytorch repo
Cross-checked against pytorch/pytorch for the last 12 months (3,489 rows, 5,088 distinct SHAs):
(repo_m_ct − repo_v_ct)/60to the second.