-
Notifications
You must be signed in to change notification settings - Fork 142
106 lines (93 loc) · 4.21 KB
/
Copy pathupdate_test_file_ratings.yml
File metadata and controls
106 lines (93 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Update test file ratings for TD Heuristics
on:
schedule:
- cron: 5 11 * * * # At 11:05 UTC every day or about 4am PT
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
permissions:
contents: write
id-token: write
jobs:
update-test-file-ratings:
runs-on: ubuntu-latest
steps:
- name: Checkout pytorch/test-infra
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: test-infra
- name: Checkout pytorch/pytorch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: pytorch/pytorch
path: pytorch
fetch-depth: 0
- name: Install Dependencies
run: |
pip3 install --upgrade pip
pip3 install boto3==1.35.42 clickhouse-connect==0.8.14
cd test-infra/tools/torchci
pip3 install -e .
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
with:
role-to-assume: arn:aws:iam::308535385114:role/upload_to_ossci_raw_job_status
aws-region: us-east-1
- name: Get merge base info
run: |
python3 test-infra/tools/torchci/td/get_merge_base_info.py
env:
CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }}
CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }}
CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }}
- name: Generate file test ratings
run: |
set -ex
python3 test-infra/tools/torchci/td/historical_file_failure_correlation.py
python3 test-infra/tools/torchci/td/historical_class_failure_correlation.py
python3 test-infra/tools/torchci/td/td_heuristic_historical_edited_files.py
# Do not run this one, it won't change
# python3 test-infra/tools/torchci/td/td_heuristic_profiling.py
env:
CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }}
CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }}
CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }}
- name: Push file to test file correlations to test-infra repository
if: github.event_name != 'pull_request'
uses: dmnemec/copy_file_to_another_repo_action@eebb594efdf52bc12e1b461988d7254322dac131
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
with:
source_file: "file_test_rating.json"
destination_repo: "pytorch/test-infra"
destination_folder: "stats"
destination_branch: generated-stats
user_email: "test-infra@pytorch.org"
user_name: "Pytorch Test Infra"
commit_message: "Updating file to test file correlations"
- name: Push file to test class correlations to test-infra repository
if: github.event_name != 'pull_request'
uses: dmnemec/copy_file_to_another_repo_action@eebb594efdf52bc12e1b461988d7254322dac131
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
with:
source_file: "file_test_class_rating.json"
destination_repo: "pytorch/test-infra"
destination_folder: "stats"
destination_branch: generated-stats
user_email: "test-infra@pytorch.org"
user_name: "Pytorch Test Infra"
commit_message: "Updating file to test class correlations"
- name: Push historical edited files heuristic to test-infra repository
if: github.event_name != 'pull_request'
uses: dmnemec/copy_file_to_another_repo_action@eebb594efdf52bc12e1b461988d7254322dac131
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
with:
source_file: "td_heuristic_historical_edited_files.json"
destination_repo: "pytorch/test-infra"
destination_folder: "stats"
destination_branch: generated-stats
user_email: "test-infra@pytorch.org"
user_name: "Pytorch Test Infra"
commit_message: "Updating TD heuristic: historical edited files"