Repository navigation
[CI] Upload test run reports from trunk and pull jobs, flat upload structure - #200470
georgehong wants to merge 4 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/200470
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b0686b0 with merge base 45e85ce ( 🟡 GREEN LIGHT - PR was reverted - re-landing requires human review:
Green Light will not review this PR again, on this or any later commit; re-landing it needs a human approval. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
#200470's upload of test run reports (one S3 object each, under torchci-reports/<repo>/<run id>/<job id>/, from trunk and pull jobs), on top of the C++ reports, to check C++ reports end to end before the writer lands. _linux-test.yml takes upload-test-artifacts from main, so this pins it to this PR's own ghstack branch. A ./ path doesn't work there: Linux test jobs check out inside their job container, and the runner looks for local actions outside it. pull's default test shards 1 and 2 run the C++ tests (test_libtorch), so their job folders should hold cpp.<binary>-*.report.jsonl objects next to the Python ones, matching the gtests in the job's junit XML. Authored with the help of an AI assistant (Claude). ghstack-source-id: 96f8b70 Pull-Request: #200026
#200470's upload of test run reports (one S3 object each, under torchci-reports/<repo>/<run id>/<job id>/, from trunk and pull jobs), on top of the C++ reports, to check C++ reports end to end before the writer lands. _linux-test.yml takes upload-test-artifacts from main, so this pins it to this PR's own ghstack branch. A ./ path doesn't work there: Linux test jobs check out inside their job container, and the runner looks for local actions outside it. pull's default test shards 1 and 2 run the C++ tests (test_libtorch), so their job folders should hold cpp.<binary>-*.report.jsonl objects next to the Python ones, matching the gtests in the job's junit XML. Authored with the help of an AI assistant (Claude). ghstack-source-id: 2163c0c Pull-Request: #200026
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot revert -m "reverting due to breaking the following test: test_cuda_nvml_based_avail.py::TestExtendedCUDAIsAvail::test_triton_driver_probe_does_not_poison_fork - torch.AcceleratorError: CUDA error: initialization error" -c nosignal |
|
@pytorchbot successfully started a revert job. Check the current status here. |
…pload structure (#200470)" This reverts commit 41386bd. Reverted #200470 on behalf of https://github.com/georgehong due to reverting due to breaking the following test: test_cuda_nvml_based_avail.py::TestExtendedCUDAIsAvail::test_triton_driver_probe_does_not_poison_fork - torch.AcceleratorError: CUDA error: initialization error ([comment](#200470 (comment)))
|
@georgehong your PR has been successfully reverted. |
|
@pytorchbot merge -m "passing all tests now under ci-no-td, should be safe to re-merge" |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
**Summary:**
Adds `torch.__config__._cxx_compiler()`, which returns the compiler that built PyTorch and its version, e.g. `("gcc", "11.4")`, `("clang", "21.1.0")` or `("msvc", "194134120")`. The values come from the same macros `torch.__config__.show()` prints, without `show()`'s device checks.
The test run report writer (#200470) records the compiler, and today parses it out of `show()`. However, `show()` calls `hasCUDA()`, which initializes the CUDA driver and poisons fork in the test process. With this, the writer can read the compiler without touching the device.
**Test Plan:**
```
python test/test_torch.py -k test_cxx_compiler
```
`test_cxx_compiler` checks the result against the compiler line `show()` prints.
Authored with the help of an AI assistant (Claude).
Pull Request resolved: #200715
Approved by: https://github.com/jathu
…un (#9095) pytorch/pytorch#200470 uploads each test run report as its own object, `torchci-reports/<org>/<repo>/<run id>/<job id>/<file>-<report uuid>.report.jsonl`, instead of one zip per job. Route those keys to the test run reports adapter, which now reads the object directly and takes report_uuid from the report line. That is one invocation per report (~1.3M/day), on a function whose concurrency already peaks near the account's unreserved limit, so only 10% of workflow runs are routed, picked by run id so that a run's jobs and attempts are all in or all out. TEST_RUN_REPORTS_SAMPLE_PERCENT on the function overrides it. **Test Plan** Invoked test query equivalent command in ClickHouse console. Authored with the help of an AI assistant (Claude).
Stack from ghstack (oldest at bottom):
Uploads jsonl reports in a flat directory structure:
This allows for us to lookup original report sources more easily, without having to unzip targets. If the ClickHouse user has a report UUID and job info, S3 lookup can be done through the above path. This means per-object writes are more frequent, but this also matches existing examples of test-jsons-while-running granularity.
ROCm jobs skip S3 (
skip-s3), so they upload their reports as a GitHub artifact,torchci-reports-runattempt<N>-<job id>.zip, as does any job whose junit S3 upload fails. When the attempt completes, upload-test-stats runstools/stats/upload_artifacts.py, which copies each report to the same S3 path. The copy is best effort, so a failed download or upload can't skip the test stats upload. It also skips other attempts' artifacts: the run's artifact list includes them, but their own attempt already uploaded them.Authored with the help of an AI assistant (Claude).