Skip to content

Commit 2fec0c9

Browse files
authored
Add slow group that runs periodically (#3987)
This is now available on HUD after pytorch/pytorch#98040. It includes all slow tests that run periodically. It can also be triggered by `ciflow/slow` on the PR. As this is an easy fix, I also run `yarn format` on top the the file.
1 parent a7b6937 commit 2fec0c9

File tree

1 file changed

+38
-33
lines changed

1 file changed

+38
-33
lines changed

torchci/lib/JobClassifierUtil.ts

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
import { GroupedJobStatus, JobStatus } from "components/GroupJobConclusion";
22
import { GroupData, RowData } from "./types";
33

4-
const GROUP_MEMORY_LEAK_CHECK = "Memory Leak Check"
5-
const GROUP_RERUN_DISABLED_TESTS = "Rerun Disabled Tests"
6-
const GROUP_UNSTABLE = "Unstable"
7-
const GROUP_PERIODIC = "Periodic"
8-
const GROUP_LINT = "Lint"
9-
const GROUP_INDUCTOR = "Inductor"
10-
const GROUP_ANDROID = "Android"
11-
const GROUP_ROCM = "ROCm"
12-
const GROUP_XLA = "XLA"
13-
const GROUP_LINUX = "Linux"
14-
const GROUP_BINARY_LINUX = "Binary Linux"
15-
const GROUP_BINARY_WINDOWS = "Binary Windows"
16-
const GROUP_ANNOTATIONS_AND_LABELING = "Annotations and labeling"
17-
const GROUP_DOCKER = "Docker"
18-
const GROUP_WINDOWS = "Windows"
19-
const GROUP_CALC_DOCKER_IMAGE = "GitHub calculate-docker-image"
20-
const GROUP_CI_DOCKER_IMAGE_BUILDS = "CI Docker Image Builds"
21-
const GROUP_CI_CIRCLECI_PYTORCH_IOS = "ci/circleci: pytorch_ios"
22-
const GROUP_IOS = "iOS"
23-
const GROUP_MAC = "Mac"
24-
const GROUP_PARALLEL = "Parallel"
25-
const GROUP_DOCS = "Docs"
26-
const GROUP_LIBTORCH = "Libtorch"
27-
const GROUP_OTHER = "other"
4+
const GROUP_MEMORY_LEAK_CHECK = "Memory Leak Check";
5+
const GROUP_RERUN_DISABLED_TESTS = "Rerun Disabled Tests";
6+
const GROUP_UNSTABLE = "Unstable";
7+
const GROUP_PERIODIC = "Periodic";
8+
const GROUP_SLOW = "Slow";
9+
const GROUP_LINT = "Lint";
10+
const GROUP_INDUCTOR = "Inductor";
11+
const GROUP_ANDROID = "Android";
12+
const GROUP_ROCM = "ROCm";
13+
const GROUP_XLA = "XLA";
14+
const GROUP_LINUX = "Linux";
15+
const GROUP_BINARY_LINUX = "Binary Linux";
16+
const GROUP_BINARY_WINDOWS = "Binary Windows";
17+
const GROUP_ANNOTATIONS_AND_LABELING = "Annotations and labeling";
18+
const GROUP_DOCKER = "Docker";
19+
const GROUP_WINDOWS = "Windows";
20+
const GROUP_CALC_DOCKER_IMAGE = "GitHub calculate-docker-image";
21+
const GROUP_CI_DOCKER_IMAGE_BUILDS = "CI Docker Image Builds";
22+
const GROUP_CI_CIRCLECI_PYTORCH_IOS = "ci/circleci: pytorch_ios";
23+
const GROUP_IOS = "iOS";
24+
const GROUP_MAC = "Mac";
25+
const GROUP_PARALLEL = "Parallel";
26+
const GROUP_DOCS = "Docs";
27+
const GROUP_LIBTORCH = "Libtorch";
28+
const GROUP_OTHER = "other";
2829

2930
// Jobs will be grouped with the first regex they match in this list
3031
export const groups = [
@@ -47,6 +48,10 @@ export const groups = [
4748
regex: /periodic/,
4849
name: GROUP_PERIODIC,
4950
},
51+
{
52+
regex: /slow/,
53+
name: GROUP_SLOW,
54+
},
5055
{
5156
regex: /Lint/,
5257
name: GROUP_LINT,
@@ -149,30 +154,30 @@ const HUD_GROUP_SORTING = [
149154
GROUP_CI_DOCKER_IMAGE_BUILDS,
150155
GROUP_CI_CIRCLECI_PYTORCH_IOS,
151156
GROUP_PERIODIC,
157+
GROUP_SLOW,
152158
GROUP_DOCS,
153159
GROUP_RERUN_DISABLED_TESTS,
154160
GROUP_INDUCTOR,
155161
GROUP_ANNOTATIONS_AND_LABELING,
156162
GROUP_OTHER,
157163
GROUP_UNSTABLE,
158-
]
164+
];
159165

160166
// Accepts a list of group names and returns that list sorted according to
161167
// the order defined in HUD_GROUP_SORTING
162-
export function sortGroupNamesForHUD(groupNames: string[]) : string[] {
163-
164-
let result: string[] = []
168+
export function sortGroupNamesForHUD(groupNames: string[]): string[] {
169+
let result: string[] = [];
165170
for (const group of HUD_GROUP_SORTING) {
166171
if (groupNames.includes(group)) {
167-
result.push(group)
172+
result.push(group);
168173
}
169174
}
170-
175+
171176
// Be flexible in case against any groups were left out of HUD_GROUP_SORTING
172-
let remaining = groupNames.filter(x => !result.includes(x))
177+
let remaining = groupNames.filter((x) => !result.includes(x));
173178

174-
result = result.concat(remaining)
175-
return result
179+
result = result.concat(remaining);
180+
return result;
176181
}
177182

178183
export function classifyGroup(jobName: string): string {

0 commit comments

Comments
 (0)