Skip to content

Commit

Permalink
tc
Browse files Browse the repository at this point in the history
  • Loading branch information
clee2000 committed Jan 3, 2025
1 parent d350eda commit fe58351
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
17 changes: 4 additions & 13 deletions torchci/components/benchmark/BranchAndCommitPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
import { MAIN_BRANCH, SHA_DISPLAY_LENGTH } from "components/benchmark/common";
import dayjs from "dayjs";
import { fetcher } from "lib/GeneralUtils";
import { RocksetParam } from "lib/rockset";
import { useEffect } from "react";
import useSWR from "swr";

Expand Down Expand Up @@ -48,7 +47,6 @@ function groupCommitByBranch(data: any) {

export function BranchAndCommitPicker({
queryName,
queryCollection,
queryParams,
branch,
setBranch,
Expand All @@ -57,27 +55,20 @@ export function BranchAndCommitPicker({
titlePrefix,
fallbackIndex,
timeRange,
useClickHouse,
}: {
queryName: string;
queryCollection: string;
queryParams: RocksetParam[] | {};
queryParams: { [k: string]: any };
branch: string;
setBranch: any;
commit: string;
setCommit: any;
titlePrefix: string;
fallbackIndex: number;
timeRange: any;
useClickHouse: boolean;
}) {
const url = useClickHouse
? `/api/clickhouse/${queryName}?parameters=${encodeURIComponent(
JSON.stringify(queryParams)
)}`
: `/api/query/${queryCollection}/${queryName}?parameters=${encodeURIComponent(
JSON.stringify(queryParams as RocksetParam[])
)}`;
const url = `/api/clickhouse/${queryName}?parameters=${encodeURIComponent(
JSON.stringify(queryParams)
)}`;

let { data, error } = useSWR(url, fetcher, {
refreshInterval: 60 * 60 * 1000, // refresh every hour
Expand Down
4 changes: 0 additions & 4 deletions torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ export default function Page() {
/>
<BranchAndCommitPicker
queryName={branchQueryName}
queryCollection={"inductor"}
branch={rBranch}
setBranch={setRBranch}
commit={rCommit}
Expand All @@ -377,14 +376,12 @@ export default function Page() {
titlePrefix={"Base"}
fallbackIndex={-1} // Default to the next to latest in the window
timeRange={timeRange}
useClickHouse={true}
/>
<Divider orientation="vertical" flexItem>
&mdash;Diff→
</Divider>
<BranchAndCommitPicker
queryName={branchQueryName}
queryCollection={"inductor"}
branch={lBranch}
setBranch={setLBranch}
commit={lCommit}
Expand All @@ -393,7 +390,6 @@ export default function Page() {
titlePrefix={"New"}
fallbackIndex={0} // Default to the latest commit
timeRange={timeRange}
useClickHouse={true}
/>
</Stack>

Expand Down
4 changes: 0 additions & 4 deletions torchci/pages/benchmark/compilers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ export default function Page() {
/>
<BranchAndCommitPicker
queryName={"compilers_benchmark_performance_branches"}
queryCollection={"inductor"}
queryParams={queryParams}
branch={rBranch}
setBranch={setRBranch}
Expand All @@ -311,14 +310,12 @@ export default function Page() {
titlePrefix={"Base"}
fallbackIndex={-1} // Default to the next to latest in the window
timeRange={timeRange}
useClickHouse={true}
/>
<Divider orientation="vertical" flexItem>
&mdash;Diff→
</Divider>
<BranchAndCommitPicker
queryName={"compilers_benchmark_performance_branches"}
queryCollection={"inductor"}
queryParams={queryParams}
branch={lBranch}
setBranch={setLBranch}
Expand All @@ -327,7 +324,6 @@ export default function Page() {
titlePrefix={"New"}
fallbackIndex={0} // Default to the latest commit
timeRange={timeRange}
useClickHouse={true}
/>
</Stack>
<Report
Expand Down
4 changes: 0 additions & 4 deletions torchci/pages/benchmark/llms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ export default function Page() {
/>
<BranchAndCommitPicker
queryName={"oss_ci_benchmark_branches"}
queryCollection={"benchmarks"}
queryParams={queryParams}
branch={lBranch}
setBranch={setLBranch}
Expand All @@ -370,14 +369,12 @@ export default function Page() {
titlePrefix={"Base"}
fallbackIndex={1} // Default to previous commit
timeRange={timeRange}
useClickHouse={true}
/>
<Divider orientation="vertical" flexItem>
&mdash;Diff→
</Divider>
<BranchAndCommitPicker
queryName={"oss_ci_benchmark_branches"}
queryCollection={"benchmarks"}
queryParams={queryParams}
branch={rBranch}
setBranch={setRBranch}
Expand All @@ -386,7 +383,6 @@ export default function Page() {
titlePrefix={"New"}
fallbackIndex={0} // Default to the latest commit
timeRange={timeRange}
useClickHouse={true}
/>
</Stack>
<Report
Expand Down
4 changes: 0 additions & 4 deletions torchci/pages/benchmark/torchao.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ export default function Page() {
/>
<BranchAndCommitPicker
queryName={"torchao_query_branches"}
queryCollection={"inductor"}
queryParams={queryParams}
branch={rBranch}
setBranch={setRBranch}
Expand All @@ -311,14 +310,12 @@ export default function Page() {
titlePrefix={"Base"}
fallbackIndex={-1} // Default to the next to latest in the window
timeRange={timeRange}
useClickHouse={true}
/>
<Divider orientation="vertical" flexItem>
&mdash;Diff→
</Divider>
<BranchAndCommitPicker
queryName={"torchao_query_branches"}
queryCollection={"inductor"}
queryParams={queryParams}
branch={lBranch}
setBranch={setLBranch}
Expand All @@ -327,7 +324,6 @@ export default function Page() {
titlePrefix={"New"}
fallbackIndex={0} // Default to the latest commit
timeRange={timeRange}
useClickHouse={true}
/>
</Stack>
<Report
Expand Down

0 comments on commit fe58351

Please sign in to comment.