File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # PyTorch CI Stats
2
+
3
+ We track various stats about each CI job.
4
+
5
+ 1 . 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
8
+ 2 . 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 ) .
10
+ 3 . ` 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
14
+ graph 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
+
24
+ Why this weird indirection? Because writing to Rockset requires special
25
+ permissions which, for security reasons, we do not want to give to pull request
26
+ CI. Instead, we implemented GitHub's [ recommended
27
+ pattern] ( https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ )
28
+ for cases like this.
29
+
30
+ For 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 )
You can’t perform that action at this time.
0 commit comments