Commit 1adb695 1 parent ea29dac commit 1adb695 Copy full SHA for 1adb695
File tree 2 files changed +9
-2
lines changed
torchci/components/benchmark/llms
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 5
5
IS_INCREASING_METRIC_VALUE_GOOD ,
6
6
METRIC_DISPLAY_HEADERS ,
7
7
RELATIVE_THRESHOLD ,
8
+ UNIT_FOR_METRIC ,
8
9
} from "components/benchmark/llms/common" ;
9
10
import styles from "components/metrics.module.css" ;
10
11
import { TablePanelWithData } from "components/metrics/panels/TablePanel" ;
@@ -316,6 +317,9 @@ export function SummaryPanel({
316
317
const l = v . l . actual ;
317
318
const r = v . r . actual ;
318
319
320
+ const unit =
321
+ metric in UNIT_FOR_METRIC ? UNIT_FOR_METRIC [ metric ] : "" ;
322
+
319
323
// Compute the percentage
320
324
const target = v . r . target ;
321
325
const lPercent =
@@ -330,9 +334,9 @@ export function SummaryPanel({
330
334
target && target != 0 ? `[target = ${ target } ]` : "" ;
331
335
332
336
if ( lCommit === rCommit || ! v . highlight ) {
333
- return `${ r } ${ rPercent } ${ showTarget } ` ;
337
+ return `${ r } ${ unit } ${ rPercent } ${ showTarget } ` ;
334
338
} else {
335
- return `${ l } ${ lPercent } → ${ r } ${ rPercent } ${ showTarget } ` ;
339
+ return `${ l } ${ unit } ${ lPercent } → ${ r } ${ unit } ${ rPercent } ${ showTarget } ` ;
336
340
}
337
341
} ,
338
342
} ;
Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ export const METRIC_DISPLAY_SHORT_HEADERS: { [k: string]: string } = {
83
83
"Cold compile time (s)" : "ColdCompTime" ,
84
84
"Warm compile time (s)" : "WarmCompTime" ,
85
85
} ;
86
+ export const UNIT_FOR_METRIC : { [ k : string ] : string } = {
87
+ "Speedup (%)" : "%" ,
88
+ } ;
86
89
export const DEFAULT_DEVICE_NAME = "All Devices" ;
87
90
export const DEFAULT_ARCH_NAME = "All Platforms" ;
88
91
export const DEFAULT_DTYPE_NAME = "All DType" ;
You can’t perform that action at this time.
0 commit comments