Skip to content

Commit 4570617

Browse files
committed
lint
1 parent 36db924 commit 4570617

File tree

11 files changed

+69
-33
lines changed

11 files changed

+69
-33
lines changed

torchci/clickhouse_queries/vllm/build_failed_jobs/params.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@
1212
}
1313
]
1414
}
15-

torchci/clickhouse_queries/vllm/build_failed_jobs/query.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ WHERE
2727
AND lowerUTF8(tupleElement(job, 'state')) = 'failed'
2828
AND tupleElement(job, 'soft_failed') = FALSE
2929
ORDER BY job_name ASC
30-

torchci/clickhouse_queries/vllm/continuous_builds/params.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@
1414
}
1515
]
1616
}
17-

torchci/clickhouse_queries/vllm/continuous_builds/query.sql

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ SELECT DISTINCT
1414
tupleElement(build, 'commit') AS commit,
1515
-- Determine build type
1616
if(
17-
positionCaseInsensitive(tupleElement(build, 'message'), 'Full CI run - daily') > 0,
17+
positionCaseInsensitive(
18+
tupleElement(build, 'message'), 'Full CI run - daily'
19+
)
20+
> 0,
1821
'Daily',
1922
if(
20-
positionCaseInsensitive(tupleElement(build, 'message'), 'Nightly run - All tests') > 0,
23+
positionCaseInsensitive(
24+
tupleElement(build, 'message'), 'Nightly run - All tests'
25+
)
26+
> 0,
2127
'Nightly',
2228
'Other'
2329
)
@@ -49,8 +55,13 @@ WHERE
4955
AND tupleElement(build, 'finished_at') >= {startTime: DateTime64(3)}
5056
AND tupleElement(build, 'finished_at') < {stopTime: DateTime64(3)}
5157
AND (
52-
positionCaseInsensitive(tupleElement(build, 'message'), 'Full CI run - daily') > 0
53-
OR positionCaseInsensitive(tupleElement(build, 'message'), 'Nightly run - All tests') > 0
58+
positionCaseInsensitive(
59+
tupleElement(build, 'message'), 'Full CI run - daily'
60+
)
61+
> 0
62+
OR positionCaseInsensitive(
63+
tupleElement(build, 'message'), 'Nightly run - All tests'
64+
)
65+
> 0
5466
)
5567
ORDER BY build_finished_at DESC
56-

torchci/clickhouse_queries/vllm/job_list/params.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@
1616
}
1717
]
1818
}
19-

torchci/clickhouse_queries/vllm/job_list/query.sql

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
SELECT
77
tupleElement(job, 'name') AS job_name,
88
COUNT(*) AS total_runs,
9-
countIf(lowerUTF8(tupleElement(job, 'state')) IN ('passed', 'finished', 'success')) AS passed_count,
9+
countIf(
10+
lowerUTF8(tupleElement(job, 'state')) IN (
11+
'passed', 'finished', 'success'
12+
)
13+
) AS passed_count,
1014
countIf(lowerUTF8(tupleElement(job, 'state')) = 'failed') AS failed_count,
1115
max(tupleElement(job, 'finished_at')) AS last_run_at
1216
FROM vllm.vllm_buildkite_jobs
@@ -25,14 +29,19 @@ WHERE
2529
)
2630
OR (
2731
has({jobGroups: Array(String)}, 'torch_nightly')
28-
AND positionCaseInsensitive(tupleElement(job, 'name'), 'Torch Nightly') > 0
32+
AND positionCaseInsensitive(
33+
tupleElement(job, 'name'), 'Torch Nightly'
34+
)
35+
> 0
2936
)
3037
OR (
3138
has({jobGroups: Array(String)}, 'main')
3239
AND positionCaseInsensitive(tupleElement(job, 'name'), 'AMD') = 0
33-
AND positionCaseInsensitive(tupleElement(job, 'name'), 'Torch Nightly') = 0
40+
AND positionCaseInsensitive(
41+
tupleElement(job, 'name'), 'Torch Nightly'
42+
)
43+
= 0
3444
)
3545
)
3646
GROUP BY job_name
3747
ORDER BY last_run_at DESC, total_runs DESC
38-

torchci/clickhouse_queries/vllm/recent_job_builds/params.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@
1616
}
1717
]
1818
}
19-

torchci/clickhouse_queries/vllm/recent_job_builds/query.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ SELECT
5454
duration_hours
5555
FROM job_builds
5656
ORDER BY job_finished_at DESC
57-

torchci/components/metrics/vllm/ContinuousBuildTracker.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
TableContainer,
1111
TableHead,
1212
TableRow,
13-
Tooltip,
1413
Typography,
1514
} from "@mui/material";
1615
import dayjs from "dayjs";
@@ -217,7 +216,9 @@ export default function ContinuousBuildTracker({
217216
label={build.build_type}
218217
size="small"
219218
sx={{
220-
backgroundColor: getBuildTypeColor(build.build_type),
219+
backgroundColor: getBuildTypeColor(
220+
build.build_type
221+
),
221222
color: "#fff",
222223
fontSize: "0.7rem",
223224
height: 20,
@@ -259,7 +260,9 @@ export default function ContinuousBuildTracker({
259260
</TableCell>
260261
<TableCell sx={{ fontSize: "0.85rem" }}>
261262
{build.build_finished_at
262-
? dayjs(build.build_finished_at).format("M/D/YY h:mm A")
263+
? dayjs(build.build_finished_at).format(
264+
"M/D/YY h:mm A"
265+
)
263266
: "-"}
264267
</TableCell>
265268
<TableCell align="right">
@@ -305,7 +308,9 @@ export default function ContinuousBuildTracker({
305308
</Typography>
306309
<Typography variant="caption" sx={{ color: "text.secondary" }}>
307310
{selectedBuild.build_type} build from{" "}
308-
{dayjs(selectedBuild.build_finished_at).format("M/D/YY h:mm A")}
311+
{dayjs(selectedBuild.build_finished_at).format(
312+
"M/D/YY h:mm A"
313+
)}
309314
</Typography>
310315
</Box>
311316
)}
@@ -381,4 +386,3 @@ export default function ContinuousBuildTracker({
381386
</Paper>
382387
);
383388
}
384-

torchci/components/metrics/vllm/JobBuildsPanel.tsx

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ function getStateColor(
7171
softFailed: boolean
7272
): { bg: string; text: string } {
7373
const stateLower = state.toLowerCase();
74-
if (stateLower === "passed" || stateLower === "finished" || stateLower === "success") {
74+
if (
75+
stateLower === "passed" ||
76+
stateLower === "finished" ||
77+
stateLower === "success"
78+
) {
7579
return { bg: COLOR_SUCCESS, text: "#fff" };
7680
}
7781
if (stateLower === "failed") {
@@ -154,10 +158,7 @@ export default function JobBuildsPanel({
154158
// Auto-select first job if nothing is selected or if selected job is no longer in the list
155159
React.useEffect(() => {
156160
if (sortedJobs.length > 0) {
157-
if (
158-
!selectedJob ||
159-
!sortedJobs.some((j) => j.job_name === selectedJob)
160-
) {
161+
if (!selectedJob || !sortedJobs.some((j) => j.job_name === selectedJob)) {
161162
setSelectedJob(sortedJobs[0].job_name);
162163
}
163164
}
@@ -224,7 +225,9 @@ export default function JobBuildsPanel({
224225
<TableCell align="right">
225226
<TableSortLabel
226227
active={sortField === "total_runs"}
227-
direction={sortField === "total_runs" ? sortOrder : "desc"}
228+
direction={
229+
sortField === "total_runs" ? sortOrder : "desc"
230+
}
228231
onClick={() => handleSort("total_runs")}
229232
>
230233
Runs
@@ -233,7 +236,9 @@ export default function JobBuildsPanel({
233236
<TableCell align="right">
234237
<TableSortLabel
235238
active={sortField === "passed_count"}
236-
direction={sortField === "passed_count" ? sortOrder : "desc"}
239+
direction={
240+
sortField === "passed_count" ? sortOrder : "desc"
241+
}
237242
onClick={() => handleSort("passed_count")}
238243
>
239244
@@ -242,7 +247,9 @@ export default function JobBuildsPanel({
242247
<TableCell align="right">
243248
<TableSortLabel
244249
active={sortField === "failed_count"}
245-
direction={sortField === "failed_count" ? sortOrder : "desc"}
250+
direction={
251+
sortField === "failed_count" ? sortOrder : "desc"
252+
}
246253
onClick={() => handleSort("failed_count")}
247254
>
248255
@@ -339,13 +346,19 @@ export default function JobBuildsPanel({
339346
build.soft_failed
340347
);
341348
return (
342-
<TableRow key={`${build.build_number}-${build.build_id}`} hover>
349+
<TableRow
350+
key={`${build.build_number}-${build.build_id}`}
351+
hover
352+
>
343353
<TableCell sx={{ fontFamily: "monospace" }}>
344354
{build.build_number}
345355
</TableCell>
346356
<TableCell>
347357
<Chip
348-
label={getStateLabel(build.job_state, build.soft_failed)}
358+
label={getStateLabel(
359+
build.job_state,
360+
build.soft_failed
361+
)}
349362
size="small"
350363
sx={{
351364
backgroundColor: stateColors.bg,
@@ -383,7 +396,13 @@ export default function JobBuildsPanel({
383396
</Tooltip>
384397
</TableCell>
385398
<TableCell align="right">
386-
<Box sx={{ display: "flex", gap: 0.5, justifyContent: "flex-end" }}>
399+
<Box
400+
sx={{
401+
display: "flex",
402+
gap: 0.5,
403+
justifyContent: "flex-end",
404+
}}
405+
>
387406
<Link
388407
href={build.job_url}
389408
target="_blank"
@@ -425,4 +444,3 @@ export default function JobBuildsPanel({
425444
</Paper>
426445
);
427446
}
428-

0 commit comments

Comments
 (0)