tree: f700850648bf33dd47ca80ccb3d6fc88e960be83 [search]
  1. __init__.py
  2. export_test_times.py
  3. import_test_stats.py
  4. monitor.py
  5. print_test_stats.py
  6. README.md
  7. s3_stat_parser.py
  8. scribe.py
  9. test_history.py
  10. upload_sccache_stats.py
  11. upload_stats_lib.py
  12. upload_test_stats.py
tools/stats/README.md

PyTorch CI Stats

We track various stats about each CI job.

  1. Jobs upload their artifacts to an intermediate data store (either GitHub Actions artifacts or S3, depending on what permissions the job has). Example: https://github.com/pytorch/pytorch/blob/a9f6a35a33308f3be2413cc5c866baec5cfe3ba1/.github/workflows/_linux-build.yml#L144-L151
  2. When a workflow completes, a workflow_run event triggers upload-test-stats.yml.
  3. upload-test-stats downloads the raw stats from the intermediate data store and uploads them as JSON to Rockset, our metrics backend.
Job with AWS creds e.g. linux, win Job w/o AWS creds e.g. mac S3 upload-test-stats.yml GHA

Why this weird indirection? Because writing to Rockset requires special permissions which, for security reasons, we do not want to give to pull request CI. Instead, we implemented GitHub's recommended pattern for cases like this.

For more details about what stats we export, check out upload-test-stats.yml