Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions torchci/clickhouse_queries/oss_ci_benchmark_llms/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ WITH benchmarks AS (
o.job_id AS job_id,
o.model.name AS model,
o.model.backend AS backend,
o.model.origins AS origins,
o.metric.name AS metric,
floor(arrayAvg(o.metric.benchmark_values), 2) AS actual,
floor(toFloat64(o.metric.target_value), 2) AS target,
Expand Down Expand Up @@ -63,6 +64,7 @@ SELECT
job_id,
model,
backend,
origins,
metric,
actual,
target,
Expand Down
6 changes: 5 additions & 1 deletion torchci/components/benchmark/llms/ModelGraphPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ export function GraphPanel({
);
})
.map((record: LLMsBenchmarkData) => {
record.display = `${record.dtype} @ ${record.device} (${record.arch})`;
const origins =
record.origins.length !== 0
? `${record.origins.join(",")} `
: "";
record.display = `${origins}${record.dtype} @ ${record.device} (${record.arch})`;
return record;
})
: dataWithSpeedup
Expand Down
1 change: 1 addition & 0 deletions torchci/components/benchmark/llms/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface LLMsBenchmarkData {
granularity_bucket: string;
model: string;
backend: string;
origins: string[];
workflow_id: number;
job_id: number;
metric: string;
Expand Down
17 changes: 14 additions & 3 deletions torchci/lib/benchmark/llmUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ export function computeGeomean(data: LLMsBenchmarkData[], metricName: string) {
return;
}

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

const [bucket, workflowId, jobId, backend, dtype, device, arch, metric] =
k.split("+");
const [
bucket,
workflowId,
jobId,
backend,
dtype,
origins,
device,
arch,
metric,
] = k.split("+");
returnedGeomean.push({
granularity_bucket: bucket,
model: "",
backend: backend,
origins: origins.split(","),
workflow_id: Number(workflowId),
job_id: Number(jobId),
metric: `${metric} (geomean)`,
Expand Down

0 comments on commit 1b23394

Please sign in to comment.