Skip to content

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

torchci/clickhouse_queries/oss_ci_benchmark_llms/query.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ WITH benchmarks AS (
88
o.job_id AS job_id,
99
o.model.name AS model,
1010
o.model.backend AS backend,
11+
o.model.origins AS origins,
1112
o.metric.name AS metric,
1213
floor(arrayAvg(o.metric.benchmark_values), 2) AS actual,
1314
floor(toFloat64(o.metric.target_value), 2) AS target,
@@ -63,6 +64,7 @@ SELECT
6364
job_id,
6465
model,
6566
backend,
67+
origins,
6668
metric,
6769
actual,
6870
target,

torchci/components/benchmark/llms/ModelGraphPanel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ export function GraphPanel({
104104
);
105105
})
106106
.map((record: LLMsBenchmarkData) => {
107-
record.display = `${record.dtype} @ ${record.device} (${record.arch})`;
107+
const origins =
108+
record.origins.length !== 0
109+
? `${record.origins.join(",")} `
110+
: "";
111+
record.display = `${origins}${record.dtype} @ ${record.device} (${record.arch})`;
108112
return record;
109113
})
110114
: dataWithSpeedup

torchci/components/benchmark/llms/common.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface LLMsBenchmarkData {
4343
granularity_bucket: string;
4444
model: string;
4545
backend: string;
46+
origins: string[];
4647
workflow_id: number;
4748
job_id: number;
4849
metric: string;

torchci/lib/benchmark/llmUtils.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ export function computeGeomean(data: LLMsBenchmarkData[], metricName: string) {
169169
return;
170170
}
171171

172-
const k = `${r.granularity_bucket}+${r.workflow_id}+${r.job_id}+${r.backend}+${r.dtype}+${r.device}+${r.arch}+${r.metric}`;
172+
const origins = r.origins.join(",");
173+
const k = `${r.granularity_bucket}+${r.workflow_id}+${r.job_id}+${r.backend}+${r.dtype}+${origins}+${r.device}+${r.arch}+${r.metric}`;
173174
if (!(k in metricValues)) {
174175
metricValues[k] = [];
175176
}
@@ -182,12 +183,22 @@ export function computeGeomean(data: LLMsBenchmarkData[], metricName: string) {
182183
Object.keys(metricValues).forEach((k: string) => {
183184
const gm = geomean(metricValues[k]);
184185

185-
const [bucket, workflowId, jobId, backend, dtype, device, arch, metric] =
186-
k.split("+");
186+
const [
187+
bucket,
188+
workflowId,
189+
jobId,
190+
backend,
191+
dtype,
192+
origins,
193+
device,
194+
arch,
195+
metric,
196+
] = k.split("+");
187197
returnedGeomean.push({
188198
granularity_bucket: bucket,
189199
model: "",
190200
backend: backend,
201+
origins: origins.split(","),
191202
workflow_id: Number(workflowId),
192203
job_id: Number(jobId),
193204
metric: `${metric} (geomean)`,

0 commit comments

Comments
 (0)