Name Date Size #Lines LOC

..--

README.mdH A D25-Apr-20251.4 KiB3224

__init__.pyH A D25-Apr-20250 10

check_disabled_tests.pyH A D25-Apr-20258.7 KiB283210

export_test_times.pyH A D25-Apr-2025367 1811

import_test_stats.pyH A D25-Apr-20256.5 KiB194152

monitor.pyH A D25-Apr-20254.7 KiB146111

test_dashboard.pyH A D25-Apr-20256.6 KiB188159

upload_artifacts.pyH A D25-Apr-20252 KiB6350

upload_dynamo_perf_stats.pyH A D25-Apr-20255.3 KiB177150

upload_external_contrib_stats.pyH A D25-Apr-20254.9 KiB158141

upload_metrics.pyH A D25-Apr-20256.9 KiB193139

upload_sccache_stats.pyH A D25-Apr-20251.5 KiB5242

upload_stats_lib.pyH A D25-Apr-20257.8 KiB265201

upload_test_stat_aggregates.pyH A D25-Apr-20253 KiB8773

upload_test_stats.pyH A D25-Apr-20259.2 KiB294204

upload_test_stats_intermediate.pyH A D25-Apr-2025907 3122

README.md

1# PyTorch CI Stats
2
3We track various stats about each CI job.
4
51. Jobs upload their artifacts to an intermediate data store (either GitHub
6   Actions artifacts or S3, depending on what permissions the job has). Example:
7   https://github.com/pytorch/pytorch/blob/a9f6a35a33308f3be2413cc5c866baec5cfe3ba1/.github/workflows/_linux-build.yml#L144-L151
82. When a workflow completes, a `workflow_run` event [triggers
9   `upload-test-stats.yml`](https://github.com/pytorch/pytorch/blob/d9fca126fca7d7780ae44170d30bda901f4fe35e/.github/workflows/upload-test-stats.yml#L4).
103. `upload-test-stats` downloads the raw stats from the intermediate data store
11   and uploads them as JSON to Rockset, our metrics backend.
12
13```mermaid
14graph LR
15    J1[Job with AWS creds<br>e.g. linux, win] --raw stats--> S3[(AWS S3)]
16    J2[Job w/o AWS creds<br>e.g. mac] --raw stats--> GHA[(GH artifacts)]
17
18    S3 --> uts[upload-test-stats.yml]
19    GHA --> uts
20
21    uts --json--> R[(Rockset)]
22```
23
24Why this weird indirection? Because writing to Rockset requires special
25permissions which, for security reasons, we do not want to give to pull request
26CI. Instead, we implemented GitHub's [recommended
27pattern](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
28for cases like this.
29
30For more details about what stats we export, check out
31[`upload-test-stats.yml`](https://github.com/pytorch/pytorch/blob/d9fca126fca7d7780ae44170d30bda901f4fe35e/.github/workflows/upload-test-stats.yml)
32