mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Give TD it's own job so that each shard can get the results from this one job artifact and they will always be in sync with each other/no longer need to worry about consistently issues * Move test discovery to its own file that is not dependent on torch so it can be run without building torch * Cannot do cpp test discovery before building pytorch * Move TD calculation to own file that will create a json file with the final results * TD is now job/build env agnostic * TD will rank all tests, including those that test jobs may not want to run (ex it will rank distributed tests along with default tests, even though these tests are never run on the same machine together) Pull Request resolved: https://github.com/pytorch/pytorch/pull/118250 Approved by: https://github.com/huydhn |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| check_disabled_tests.py | ||
| export_test_times.py | ||
| import_test_stats.py | ||
| monitor.py | ||
| README.md | ||
| upload_artifacts.py | ||
| upload_dynamo_perf_stats.py | ||
| upload_external_contrib_stats.py | ||
| upload_metrics.py | ||
| upload_sccache_stats.py | ||
| upload_stats_lib.py | ||
| upload_test_stat_aggregates.py | ||
| upload_test_stats.py | ||
PyTorch CI Stats
We track various stats about each CI job.
- 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) - When a workflow completes, a
workflow_runevent triggersupload-test-stats.yml. upload-test-statsdownloads 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