Skip to content

Commit a4e68d5

Browse files
committed
tc
1 parent 0a8af5b commit a4e68d5

File tree

2 files changed

+35
-191
lines changed

2 files changed

+35
-191
lines changed

torchci/components/HudGroupingSettings/defaults.ts

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const GROUP_MEMORY_LEAK_CHECK = "Memory Leak Check";
44
const GROUP_RERUN_DISABLED_TESTS = "Rerun Disabled Tests";
55
export const GROUP_UNSTABLE = "Unstable";
66
const GROUP_PERIODIC = "Periodic";
7+
const GROUP_INDUCTOR_PERIODIC = "Inductor Periodic";
78
const GROUP_SLOW = "Slow";
89
const GROUP_LINT = "Lint";
910
const GROUP_INDUCTOR = "Inductor";
@@ -24,24 +25,41 @@ const GROUP_MAC = "Mac";
2425
const GROUP_PARALLEL = "Parallel";
2526
const GROUP_DOCS = "Docs";
2627
const GROUP_LIBTORCH = "Libtorch";
28+
const GROUP_OTHER_VIABLE_STRICT_BLOCKING = "Other viable/strict blocking";
29+
const GROUP_XPU = "XPU";
30+
const GROUP_VLLM = "vLLM";
2731
export const GROUP_OTHER = "other";
2832

2933
// Jobs will be grouped with the first regex they match in this list
30-
const groups = [
34+
export const groups = [
3135
{
32-
regex: /mem_leak_check/,
36+
regex: /vllm/,
37+
name: GROUP_VLLM,
38+
},
39+
{
40+
// Weird regex because some names are too long and getting cut off
41+
// TODO: figure out a better way to name the job or filter them
42+
regex: /, mem_leak/,
3343
name: GROUP_MEMORY_LEAK_CHECK,
3444
persistent: true,
3545
},
3646
{
37-
regex: /rerun_disabled_tests/,
47+
regex: /, rerun_/,
3848
name: GROUP_RERUN_DISABLED_TESTS,
3949
persistent: true,
4050
},
4151
{
4252
regex: /unstable/,
4353
name: GROUP_UNSTABLE,
4454
},
55+
{
56+
regex: /^xpu/,
57+
name: GROUP_XPU,
58+
},
59+
{
60+
regex: /inductor-periodic/,
61+
name: GROUP_INDUCTOR_PERIODIC,
62+
},
4563
{
4664
regex: /periodic/,
4765
name: GROUP_PERIODIC,
@@ -129,6 +147,12 @@ const groups = [
129147
regex: /libtorch/,
130148
name: GROUP_LIBTORCH,
131149
},
150+
{
151+
// This is a catch-all for jobs that are viable but strict blocking
152+
// Excluding linux-binary-* jobs because they are already grouped further up
153+
regex: /(pull)|(trunk)/,
154+
name: GROUP_OTHER_VIABLE_STRICT_BLOCKING,
155+
},
132156
];
133157

134158
// Jobs on HUD home page will be sorted according to this list, with anything left off at the end
@@ -140,7 +164,10 @@ const HUD_GROUP_SORTING = [
140164
GROUP_IOS,
141165
GROUP_MAC,
142166
GROUP_ROCM,
167+
GROUP_XPU,
143168
GROUP_XLA,
169+
GROUP_OTHER_VIABLE_STRICT_BLOCKING, // placed after the last group that tends to have viable/strict blocking jobs
170+
GROUP_VLLM,
144171
GROUP_PARALLEL,
145172
GROUP_LIBTORCH,
146173
GROUP_ANDROID,
@@ -153,11 +180,13 @@ const HUD_GROUP_SORTING = [
153180
GROUP_SLOW,
154181
GROUP_DOCS,
155182
GROUP_INDUCTOR,
183+
GROUP_INDUCTOR_PERIODIC,
156184
GROUP_ANNOTATIONS_AND_LABELING,
157-
GROUP_OTHER,
158185
GROUP_BINARY_WINDOWS,
159186
GROUP_MEMORY_LEAK_CHECK,
160187
GROUP_RERUN_DISABLED_TESTS,
188+
// These two groups should always be at the end
189+
GROUP_OTHER,
161190
GROUP_UNSTABLE,
162191
];
163192

torchci/lib/JobClassifierUtil.ts

Lines changed: 2 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,7 @@
1+
import { Group } from "components/HudGroupingSettings/mainPageSettingsUtils";
12
import { GroupedJobStatus, JobStatus } from "components/job/GroupJobConclusion";
23
import { getOpenUnstableIssues } from "lib/jobUtils";
3-
import { IssueData, RowData } from "./types";
4-
import { Group } from "components/HudGroupingSettings/mainPageSettingsUtils";
5-
6-
const GROUP_MEMORY_LEAK_CHECK = "Memory Leak Check";
7-
const GROUP_RERUN_DISABLED_TESTS = "Rerun Disabled Tests";
8-
const GROUP_UNSTABLE = "Unstable";
9-
const GROUP_PERIODIC = "Periodic";
10-
const GROUP_INDUCTOR_PERIODIC = "Inductor Periodic";
11-
const GROUP_SLOW = "Slow";
12-
const GROUP_LINT = "Lint";
13-
const GROUP_INDUCTOR = "Inductor";
14-
const GROUP_ANDROID = "Android";
15-
const GROUP_ROCM = "ROCm";
16-
const GROUP_XLA = "XLA";
17-
const GROUP_LINUX = "Linux";
18-
const GROUP_BINARY_LINUX = "Binary Linux";
19-
const GROUP_BINARY_WINDOWS = "Binary Windows";
20-
const GROUP_ANNOTATIONS_AND_LABELING = "Annotations and labeling";
21-
const GROUP_DOCKER = "Docker";
22-
const GROUP_WINDOWS = "Windows";
23-
const GROUP_CALC_DOCKER_IMAGE = "GitHub calculate-docker-image";
24-
const GROUP_CI_DOCKER_IMAGE_BUILDS = "CI Docker Image Builds";
25-
const GROUP_CI_CIRCLECI_PYTORCH_IOS = "ci/circleci: pytorch_ios";
26-
const GROUP_IOS = "iOS";
27-
const GROUP_MAC = "Mac";
28-
const GROUP_PARALLEL = "Parallel";
29-
const GROUP_DOCS = "Docs";
30-
const GROUP_LIBTORCH = "Libtorch";
31-
const GROUP_OTHER_VIABLE_STRICT_BLOCKING = "Other viable/strict blocking";
32-
const GROUP_XPU = "XPU";
33-
const GROUP_VLLM = "vLLM";
34-
const GROUP_OTHER = "other";
35-
36-
// Jobs will be grouped with the first regex they match in this list
37-
export const groups = [
38-
{
39-
regex: /vllm/,
40-
name: GROUP_VLLM,
41-
},
42-
{
43-
// Weird regex because some names are too long and getting cut off
44-
// TODO: figure out a better way to name the job or filter them
45-
regex: /, mem_leak/,
46-
name: GROUP_MEMORY_LEAK_CHECK,
47-
persistent: true,
48-
},
49-
{
50-
regex: /, rerun_/,
51-
name: GROUP_RERUN_DISABLED_TESTS,
52-
persistent: true,
53-
},
54-
{
55-
regex: /unstable/,
56-
name: GROUP_UNSTABLE,
57-
},
58-
{
59-
regex: /^xpu/,
60-
name: GROUP_XPU,
61-
},
62-
{
63-
regex: /inductor-periodic/,
64-
name: GROUP_INDUCTOR_PERIODIC,
65-
},
66-
{
67-
regex: /periodic/,
68-
name: GROUP_PERIODIC,
69-
},
70-
{
71-
regex: /slow/,
72-
name: GROUP_SLOW,
73-
},
74-
{
75-
regex: /Lint/,
76-
name: GROUP_LINT,
77-
},
78-
{
79-
regex: /inductor/,
80-
name: GROUP_INDUCTOR,
81-
},
82-
{
83-
regex: /android/,
84-
name: GROUP_ANDROID,
85-
},
86-
{
87-
regex: /rocm/,
88-
name: GROUP_ROCM,
89-
},
90-
{
91-
regex: /-xla/,
92-
name: GROUP_XLA,
93-
},
94-
{
95-
regex: /(\slinux-|sm86)/,
96-
name: GROUP_LINUX,
97-
},
98-
{
99-
regex: /linux-binary/,
100-
name: GROUP_BINARY_LINUX,
101-
},
102-
{
103-
regex: /windows-binary/,
104-
name: GROUP_BINARY_WINDOWS,
105-
},
106-
{
107-
regex:
108-
/(Add annotations )|(Close stale pull requests)|(Label PRs & Issues)|(Triage )|(Update S3 HTML indices)|(is-properly-labeled)|(Facebook CLA Check)|(auto-label-rocm)/,
109-
name: GROUP_ANNOTATIONS_AND_LABELING,
110-
},
111-
{
112-
regex:
113-
/(ci\/circleci: docker-pytorch-)|(ci\/circleci: ecr_gc_job_)|(ci\/circleci: docker_for_ecr_gc_build_job)|(Garbage Collect ECR Images)/,
114-
name: GROUP_DOCKER,
115-
},
116-
{
117-
regex: /\swin-/,
118-
name: GROUP_WINDOWS,
119-
},
120-
{
121-
regex: / \/ calculate-docker-image/,
122-
name: GROUP_CALC_DOCKER_IMAGE,
123-
},
124-
{
125-
regex: /docker-builds/,
126-
name: GROUP_CI_DOCKER_IMAGE_BUILDS,
127-
},
128-
{
129-
regex: /ci\/circleci: pytorch_ios_/,
130-
name: GROUP_CI_CIRCLECI_PYTORCH_IOS,
131-
},
132-
{
133-
regex: /ios-/,
134-
name: GROUP_IOS,
135-
},
136-
{
137-
regex: /\smacos-/,
138-
name: GROUP_MAC,
139-
},
140-
{
141-
regex:
142-
/(ci\/circleci: pytorch_parallelnative_)|(ci\/circleci: pytorch_paralleltbb_)|(paralleltbb-linux-)|(parallelnative-linux-)/,
143-
name: GROUP_PARALLEL,
144-
},
145-
{
146-
regex: /(docs push)|(docs build)/,
147-
name: GROUP_DOCS,
148-
},
149-
{
150-
regex: /libtorch/,
151-
name: GROUP_LIBTORCH,
152-
},
153-
{
154-
// This is a catch-all for jobs that are viable but strict blocking
155-
// Excluding linux-binary-* jobs because they are already grouped further up
156-
regex: /(pull)|(trunk)/,
157-
name: GROUP_OTHER_VIABLE_STRICT_BLOCKING,
158-
},
159-
];
160-
4+
import { IssueData } from "./types";
1615

1626
// Accepts a list of group names and returns that list sorted according to
1637
// the order defined in HUD_GROUP_SORTING
@@ -181,35 +25,6 @@ export function sortGroupNamesForHUD(
18125
return result;
18226
}
18327

184-
export function classifyGroup(
185-
jobName: string,
186-
showUnstableGroup: boolean,
187-
unstableIssues?: IssueData[]
188-
): string {
189-
const openUnstableIssues = getOpenUnstableIssues(jobName, unstableIssues);
190-
let assignedGroup = undefined;
191-
for (const group of groups) {
192-
if (jobName.match(group.regex)) {
193-
assignedGroup = group;
194-
break;
195-
}
196-
}
197-
198-
// Check if the job has been marked as unstable but doesn't include the
199-
// unstable keyword.
200-
if (!showUnstableGroup && assignedGroup?.persistent) {
201-
// If the unstable group is not being shown, then persistent groups (mem
202-
// leak check, rerun disabled tests) should not be overwritten
203-
return assignedGroup.name;
204-
}
205-
206-
if (openUnstableIssues !== undefined && openUnstableIssues.length !== 0) {
207-
return GROUP_UNSTABLE;
208-
}
209-
210-
return assignedGroup === undefined ? GROUP_OTHER : assignedGroup.name;
211-
}
212-
21328
export function getGroupConclusionChar(conclusion?: GroupedJobStatus): string {
21429
switch (conclusion) {
21530
case GroupedJobStatus.Success:

0 commit comments

Comments
 (0)