Skip to content

Commit bc9276b

Browse files
authored
Add Raw Render Feature for debugging purpose (#7448)
Add button to show raw json response for table so that users can debug it This helps during our migration plan to new UI too, since we found out some data mismatch between legacy and new UI
1 parent 548cf22 commit bc9276b

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

torchci/components/benchmark/llms/components/LLMsSummaryPanel.tsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Grid, styled, Tooltip } from "@mui/material";
22
import { GridCellParams, GridRenderCellParams } from "@mui/x-data-grid";
3+
import { RenderRawContent } from "components/benchmark_v3/components/common/RawContentDialog";
34
import styles from "components/metrics.module.css";
45
import { TablePanelWithData } from "components/metrics/panels/TablePanel";
56
import { Granularity } from "components/metrics/panels/TimeSeriesPanel";
@@ -478,21 +479,25 @@ export default function LLMsSummaryPanel({
478479

479480
// TODO (huydhn): Table bigger than 100 rows requires x-data-grid-pro
480481
return (
481-
<Grid container spacing={10}>
482-
<Grid size={{ xs: 12, lg: 11.8 }}>
483-
<TablePanelWithData
484-
title={"Models"}
485-
data={data}
486-
columns={columns}
487-
dataGridProps={{ getRowId: (el: any) => el.name }}
488-
showFooter={true}
489-
disableAutoPageSize={true}
490-
customStyle={{
491-
maxHeight: 1200,
492-
}}
493-
/>
482+
<>
483+
<RenderRawContent data={lData} buttonName="lData" />
484+
<RenderRawContent data={rData} buttonName="rData" />
485+
<Grid container spacing={10}>
486+
<Grid size={{ xs: 12, lg: 11.8 }}>
487+
<TablePanelWithData
488+
title={"Models"}
489+
data={data}
490+
columns={columns}
491+
dataGridProps={{ getRowId: (el: any) => el.name }}
492+
showFooter={true}
493+
disableAutoPageSize={true}
494+
customStyle={{
495+
maxHeight: 1200,
496+
}}
497+
/>
498+
</Grid>
494499
</Grid>
495-
</Grid>
500+
</>
496501
);
497502
}
498503

torchci/lib/benchmark/api_helper/backend/dataFetchers/queryBuilderUtils/benchmarkDataQueryBuilder.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,10 @@ export class PytorchHelionDataFetcher
492492
"floor(arrayAvg(o.metric.'benchmark_values'), 2)",
493493
"avg_value"
494494
);
495+
this._data_query.addSelectStatement(
496+
"tupleElement(o.metric, 'benchmark_values')",
497+
"raw_value_list"
498+
);
495499
}
496500

497501
applyFormat(

0 commit comments

Comments
 (0)