Upload autorevert advisor verdicts to S3 for ClickHouse ingestion#178810
Closed
izaitsevfb wants to merge 1 commit intomainfrom
Closed
Upload autorevert advisor verdicts to S3 for ClickHouse ingestion#178810izaitsevfb wants to merge 1 commit intomainfrom
izaitsevfb wants to merge 1 commit intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/178810
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5064032 with merge base d0371b3 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Adds a step to the advisor workflow that uploads the verdict JSON (enriched with signal metadata) to S3 for ingestion into misc.autorevert_advisor_verdicts via the clickhouse-replicator-s3 Lambda. This enables the autorevert lambda to read verdicts from CH instead of downloading GitHub Actions artifacts.
f71e45c to
5064032
Compare
wdvr
approved these changes
Mar 31, 2026
Contributor
Author
|
@pytorchbot merge -f 'lint passed' |
Collaborator
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
AaronWang04
pushed a commit
to AaronWang04/pytorch
that referenced
this pull request
Mar 31, 2026
…torch#178810) ## Summary Adds a workflow step that uploads the AI advisor verdict to S3 (`ossci-raw-job-status/autorevert_advisor_verdicts/`) for ingestion into ClickHouse. This enables the autorevert lambda to read verdicts from CH (fast, single query) instead of downloading GitHub Actions artifacts (~1.7s each, up to 66 in a 16h window). The uploaded JSON includes the verdict fields plus signal metadata (signal_key, suspect_commit, pr_number, workflow_name) extracted from the `signal_pattern` input. ## Dependencies - [test-infra#7906](pytorch/test-infra#7906) — CH table schema + Lambda adapter - Internal: S3 bucket notification + IAM permissions for the `bedrock` environment role ## Test plan - [x] Verify the `jq` command correctly builds the enriched JSON - [x] Verify S3 upload succeeds with appropriate IAM permissions - [x] End-to-end: verdict appears in `misc.autorevert_advisor_verdicts` table ^ verified end-to-end on ciforge Pull Request resolved: pytorch#178810 Approved by: https://github.com/wdvr
3 tasks
pytorch-bot bot
pushed a commit
that referenced
this pull request
Apr 2, 2026
…78810) ## Summary Adds a workflow step that uploads the AI advisor verdict to S3 (`ossci-raw-job-status/autorevert_advisor_verdicts/`) for ingestion into ClickHouse. This enables the autorevert lambda to read verdicts from CH (fast, single query) instead of downloading GitHub Actions artifacts (~1.7s each, up to 66 in a 16h window). The uploaded JSON includes the verdict fields plus signal metadata (signal_key, suspect_commit, pr_number, workflow_name) extracted from the `signal_pattern` input. ## Dependencies - [test-infra#7906](pytorch/test-infra#7906) — CH table schema + Lambda adapter - Internal: S3 bucket notification + IAM permissions for the `bedrock` environment role ## Test plan - [x] Verify the `jq` command correctly builds the enriched JSON - [x] Verify S3 upload succeeds with appropriate IAM permissions - [x] End-to-end: verdict appears in `misc.autorevert_advisor_verdicts` table ^ verified end-to-end on ciforge Pull Request resolved: #178810 Approved by: https://github.com/wdvr
izaitsevfb
added a commit
to pytorch/test-infra
that referenced
this pull request
Apr 2, 2026
## Summary Closes the loop on the AI advisor: autorevert now reads verdict results from `misc.autorevert_advisor_verdicts` (populated via S3 ingestion from the advisor workflow) and uses them to make faster decisions. ## Verdict Handling | Advisor Verdict | Autorevert Action | |----------------|-------------------| | `revert` | Produce `AutorevertPattern` immediately — skip restarts | | `not_related` | Early exit as `Ineligible(ADVISOR_NOT_RELATED)` | | `garbage` | Suppress signal for 2h since verdict timestamp | | `unsure` | Continue normal restart-to-confirm flow | ## Changes - **`signal.py`**: `AdvisorVerdict` enum, `AIAdvisorResult` dataclass, `SignalCommit.advisor_result` field, `_check_advisor_verdict()` method, restructured `process_valid_autorevert_pattern()` (flakiness check moved after advisor) - **`signal_extraction_datasource.py`**: `fetch_advisor_verdicts()` — CH query for verdicts by commit SHAs - **`signal_extraction.py`**: `_attach_advisor_verdicts()` — post-processing step that wires CH data to SignalCommit objects - **`tests/test_signal.py`**: 8 new tests covering all verdict types, 2h expiry, signal key matching, flaky signal handling ## Dependencies - [#7839](#7839) (merged) — advisor dispatch from lambda - [#7906](#7906) (merged) — CH table + S3 ingestion - [pytorch/pytorch#178810](pytorch/pytorch#178810) (pending) — workflow S3 upload step ## Test plan - [x] 60 tests passing (8 new) - [x] End-to-end verified: ciforge advisor run → S3 → CH → row queryable - [ ] Deploy and verify verdicts are read during live autorevert runs tested locally: ``` python -m pytorch_auto_revert --dry-run autorevert-checker trunk --hours 18 --as-of "2026-03-31 18:12" --hud-html python -m pytorch_auto_revert --dry-run autorevert-checker trunk --hours 18 --hud-html ``` example of the result: [2026-04-01T00-11-54.124373-00-00.html](https://github.com/user-attachments/files/26392664/2026-04-01T00-11-54.124373-00-00.html) [2026-04-01T01-22-24.845831-00-00.html](https://github.com/user-attachments/files/26393283/2026-04-01T01-22-24.845831-00-00.html)
IvanKobzarev
pushed a commit
to IvanKobzarev/pytorch
that referenced
this pull request
Apr 3, 2026
…torch#178810) ## Summary Adds a workflow step that uploads the AI advisor verdict to S3 (`ossci-raw-job-status/autorevert_advisor_verdicts/`) for ingestion into ClickHouse. This enables the autorevert lambda to read verdicts from CH (fast, single query) instead of downloading GitHub Actions artifacts (~1.7s each, up to 66 in a 16h window). The uploaded JSON includes the verdict fields plus signal metadata (signal_key, suspect_commit, pr_number, workflow_name) extracted from the `signal_pattern` input. ## Dependencies - [test-infra#7906](pytorch/test-infra#7906) — CH table schema + Lambda adapter - Internal: S3 bucket notification + IAM permissions for the `bedrock` environment role ## Test plan - [x] Verify the `jq` command correctly builds the enriched JSON - [x] Verify S3 upload succeeds with appropriate IAM permissions - [x] End-to-end: verdict appears in `misc.autorevert_advisor_verdicts` table ^ verified end-to-end on ciforge Pull Request resolved: pytorch#178810 Approved by: https://github.com/wdvr
nklshy-aws
pushed a commit
to nklshy-aws/pytorch
that referenced
this pull request
Apr 7, 2026
…torch#178810) ## Summary Adds a workflow step that uploads the AI advisor verdict to S3 (`ossci-raw-job-status/autorevert_advisor_verdicts/`) for ingestion into ClickHouse. This enables the autorevert lambda to read verdicts from CH (fast, single query) instead of downloading GitHub Actions artifacts (~1.7s each, up to 66 in a 16h window). The uploaded JSON includes the verdict fields plus signal metadata (signal_key, suspect_commit, pr_number, workflow_name) extracted from the `signal_pattern` input. ## Dependencies - [test-infra#7906](pytorch/test-infra#7906) — CH table schema + Lambda adapter - Internal: S3 bucket notification + IAM permissions for the `bedrock` environment role ## Test plan - [x] Verify the `jq` command correctly builds the enriched JSON - [x] Verify S3 upload succeeds with appropriate IAM permissions - [x] End-to-end: verdict appears in `misc.autorevert_advisor_verdicts` table ^ verified end-to-end on ciforge Pull Request resolved: pytorch#178810 Approved by: https://github.com/wdvr
bobrenjc93
pushed a commit
to bobrenjc93/pytorch
that referenced
this pull request
Apr 9, 2026
…torch#178810) ## Summary Adds a workflow step that uploads the AI advisor verdict to S3 (`ossci-raw-job-status/autorevert_advisor_verdicts/`) for ingestion into ClickHouse. This enables the autorevert lambda to read verdicts from CH (fast, single query) instead of downloading GitHub Actions artifacts (~1.7s each, up to 66 in a 16h window). The uploaded JSON includes the verdict fields plus signal metadata (signal_key, suspect_commit, pr_number, workflow_name) extracted from the `signal_pattern` input. ## Dependencies - [test-infra#7906](pytorch/test-infra#7906) — CH table schema + Lambda adapter - Internal: S3 bucket notification + IAM permissions for the `bedrock` environment role ## Test plan - [x] Verify the `jq` command correctly builds the enriched JSON - [x] Verify S3 upload succeeds with appropriate IAM permissions - [x] End-to-end: verdict appears in `misc.autorevert_advisor_verdicts` table ^ verified end-to-end on ciforge Pull Request resolved: pytorch#178810 Approved by: https://github.com/wdvr
bobrenjc93
pushed a commit
to bobrenjc93/pytorch
that referenced
this pull request
Apr 10, 2026
…torch#178810) ## Summary Adds a workflow step that uploads the AI advisor verdict to S3 (`ossci-raw-job-status/autorevert_advisor_verdicts/`) for ingestion into ClickHouse. This enables the autorevert lambda to read verdicts from CH (fast, single query) instead of downloading GitHub Actions artifacts (~1.7s each, up to 66 in a 16h window). The uploaded JSON includes the verdict fields plus signal metadata (signal_key, suspect_commit, pr_number, workflow_name) extracted from the `signal_pattern` input. ## Dependencies - [test-infra#7906](pytorch/test-infra#7906) — CH table schema + Lambda adapter - Internal: S3 bucket notification + IAM permissions for the `bedrock` environment role ## Test plan - [x] Verify the `jq` command correctly builds the enriched JSON - [x] Verify S3 upload succeeds with appropriate IAM permissions - [x] End-to-end: verdict appears in `misc.autorevert_advisor_verdicts` table ^ verified end-to-end on ciforge Pull Request resolved: pytorch#178810 Approved by: https://github.com/wdvr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a workflow step that uploads the AI advisor verdict to S3 (
ossci-raw-job-status/autorevert_advisor_verdicts/) for ingestion into ClickHouse. This enables the autorevert lambda to read verdicts from CH (fast, single query) instead of downloading GitHub Actions artifacts (~1.7s each, up to 66 in a 16h window).The uploaded JSON includes the verdict fields plus signal metadata (signal_key, suspect_commit, pr_number, workflow_name) extracted from the
signal_patterninput.Dependencies
bedrockenvironment roleTest plan
jqcommand correctly builds the enriched JSONmisc.autorevert_advisor_verdictstable^ verified end-to-end on ciforge