Skip to content

Commit 1c37877

Browse files
authored
[Helion Benchmark] Default to single view (#7123)
Stacked PRs: * #7129 * #7128 * #7126 * __->__#7123 * #7121 --- --- --- ### [Helion Benchmark] Default to single view
1 parent e3c9c84 commit 1c37877

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

torchci/components/benchmark/llms/LLMsBenchmarkPage.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ const MainPage = ({
192192
const options = data;
193193
const dropdownMapList = getBenchmarkDropdownFeatures(options, props.repoName);
194194
const metricNames = getMetricNames(data);
195+
// Default to latest for Helion Benchmark, otherwise default to oldest commit
196+
const lcommitFallbackIdx =
197+
props.benchmarkName === "Helion Benchmark" ? 0 : -1;
195198
return (
196199
<div>
197200
<Stack direction="row" spacing={2} sx={{ mb: 2 }}>
@@ -203,6 +206,7 @@ const MainPage = ({
203206
props={props}
204207
dispatch={dispatch}
205208
queryParams={queryParams}
209+
lcommitFallbackIdx={lcommitFallbackIdx}
206210
/>
207211
<LLMsReport
208212
props={props}

torchci/components/benchmark/llms/components/dashboardPicker/LLMsDashboardPicker.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ export const LLMsDashboardPicker = ({
1212
props,
1313
dispatch,
1414
queryParams,
15+
lcommitFallbackIdx,
1516
}: {
1617
props: LLMsBenchmarkProps;
1718
options?: DropdownGroupItem[];
1819
dispatch: Dispatch<any>;
1920
queryParams: any;
21+
lcommitFallbackIdx: number;
2022
}) => {
2123
if (!options) {
2224
return (
@@ -29,6 +31,7 @@ export const LLMsDashboardPicker = ({
2931
const handleChange = (key: string, newVal: any) => {
3032
dispatch({ type: "UPDATE_FIELD", field: key, value: newVal });
3133
};
34+
3235
return (
3336
<div>
3437
<Stack direction="row" spacing={2} sx={{ mb: 2 }}>
@@ -50,7 +53,7 @@ export const LLMsDashboardPicker = ({
5053
dispatch({ type: "UPDATE_FIELD", field: "lCommit", value: val });
5154
}}
5255
titlePrefix={"Base"}
53-
fallbackIndex={-1} // Default to oldest commit
56+
fallbackIndex={lcommitFallbackIdx}
5457
timeRange={props.timeRange}
5558
/>
5659
<Divider orientation="vertical" flexItem>

0 commit comments

Comments
 (0)