pytorch/tools/stats
Aaron Gokaslan 748bac8757 [BE]: Apply pyupgrade yield from and unit test alias upgrades (#94309)
Applies some more harmless pyupgrades. This one gets rid of deprecated aliases in unit_tests and more upgrades yield for loops into yield from generators which are more performance and propagates more information / exceptions from original generator. This is the modern recommended way of forwarding generators.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94309
Approved by: https://github.com/albanD
2023-02-07 20:08:58 +00:00
..
__init__.py
check_disabled_tests.py [BE]: Apply pyupgrade yield from and unit test alias upgrades (#94309) 2023-02-07 20:08:58 +00:00
export_test_times.py
import_test_stats.py
monitor.py [ROCm] tools/stats/monitor.py support (#91732) 2023-01-05 18:34:11 +00:00
README.md
upload_artifacts.py
upload_sccache_stats.py
upload_stats_lib.py Update rockset version (#94005) 2023-02-03 21:38:35 +00:00
upload_test_stats.py Add retries for get_workflow_job_id and try catch in upload_test_stats (#93401) 2023-02-01 18:33:32 +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