pytorch/tools/stats
Catherine Lee 582c0833d5 mac circleci workflows (#82780)
Add mac and ios workflows to circleci so they can be run on pull

m1 tests not included because circleci doesnt have machines

Unsure how to get certain environment variables (specifically for arm64 ios builds that require env vars like `IOS_SIGN_KEY_2022` and `IOS_DEV_TEAM_ID` that are stored in the org-member context which is not accessible by everyone.

doc regarding env vars https://docs.google.com/document/d/1J_3Z9sfu2vlHMF1fjdJfeTuxPXC6dgqJs7aU0KpYSBU/edit#

Pull Request resolved: https://github.com/pytorch/pytorch/pull/82780
Approved by: https://github.com/malfet, https://github.com/huydhn
2022-08-26 18:48:48 +00:00
..
__init__.py
export_test_times.py download test times during build to avoid race conditions (#81915) 2022-07-28 16:35:01 +00:00
import_test_stats.py use condensed disabled tests file (#84017) 2022-08-25 00:34:25 +00:00
monitor.py
print_test_stats.py Fix use-dict-literal lint (#83718) 2022-08-24 00:26:46 +00:00
README.md
s3_stat_parser.py
scribe.py
test_history.py
upload_sccache_stats.py
upload_stats_lib.py
upload_test_stats.py mac circleci workflows (#82780) 2022-08-26 18:48:48 +00:00

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: a9f6a35a33/.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.
graph LR
    J1[Job with AWS creds<br>e.g. linux, win] --raw stats--> S3[(AWS S3)]
    J2[Job w/o AWS creds<br>e.g. mac] --raw stats--> GHA[(GH artifacts)]

    S3 --> uts[upload-test-stats.yml]
    GHA --> uts

    uts --json--> R[(Rockset)]

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