Skip to content

[CI] Upload test run reports from trunk and pull jobs, flat upload structure - #200470

Closed
georgehong wants to merge 4 commits into
gh/georgehong/19/basefrom
gh/georgehong/19/head
Closed

georgehong wants to merge 4 commits into
gh/georgehong/19/basefrom
gh/georgehong/19/head

Conversation

@georgehong

@georgehong georgehong commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Uploads jsonl reports in a flat directory structure:

s3://gha-artifacts/torchci-reports/<org>/<repo>/<run id>/<job id>/<file>-<uuid>.report.jsonl

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 runs tools/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).

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🔗 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 Failures

As of commit b0686b0 with merge base 45e85ce (image):
💚 Looks good so far! There are no failures yet. 💚

🟡 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.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Oct 9, 2026
@georgehong georgehong added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 9, 2026
@georgehong georgehong changed the title [CI] Upload test run reports from trunk and pull jobs, one S3 object each [CI] Upload test run reports from trunk and pull jobs, flat upload structure Oct 9, 2026
georgehong added a commit that referenced this pull request Oct 11, 2026
#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
georgehong added a commit that referenced this pull request Oct 12, 2026
#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
[ghstack-poisoned]
@georgehong
georgehong requested review from huydhn and jathu October 12, 2026 16:36
@georgehong
georgehong marked this pull request as ready for review October 12, 2026 16:46
@georgehong
georgehong requested a review from a team as a code owner October 12, 2026 16:46
@georgehong

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@georgehong

Copy link
Copy Markdown
Contributor Author

@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

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

pytorchmergebot added a commit that referenced this pull request Oct 12, 2026
…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)))
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@georgehong your PR has been successfully reverted.

@pytorchmergebot pytorchmergebot added Reverted ci-no-td Do not run TD on this PR labels Oct 12, 2026
[ghstack-poisoned]
[ghstack-poisoned]
@georgehong

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -m "passing all tests now under ci-no-td, should be safe to re-merge"

@pytorch-bot

pytorch-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: unrecognized arguments: -m passing all tests now under ci-no-td, should be safe to re-merge

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,review,pre-review,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@georgehong

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit that referenced this pull request Oct 13, 2026
**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
georgehong added a commit to pytorch/test-infra that referenced this pull request Oct 13, 2026
…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/trunk Trigger trunk jobs on your pull request Merged Reverted topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants