Skip to content

Commit 5fb744e

Browse files
authored
[BE] Fixing build warnings when building torchci (#7194)
There are hundreds of warnings. Focusing just on the unused variable warnings for now to keep the PR readable. This code was 100% generated by claude, reviewed by human
1 parent b711f69 commit 5fb744e

14 files changed

Lines changed: 16 additions & 24 deletions

File tree

torchci/components/TorchAgentPage/ChatHistorySidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ interface ChatHistorySidebarProps {
3535
isMobile: boolean;
3636
headerHeight: number;
3737
onStartNewChat: () => void;
38-
onLoadChatSession: (sessionId: string) => void;
38+
onLoadChatSession: (_sessionId: string) => void;
3939
onToggleSidebar: () => void;
4040
}
4141

torchci/components/TorchAgentPage/QueryInputSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ interface QueryInputSectionProps {
77
query: string;
88
isLoading: boolean;
99
debugVisible: boolean;
10-
onQueryChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
11-
onSubmit: (event: React.FormEvent) => void;
10+
onQueryChange: (_event: React.ChangeEvent<HTMLInputElement>) => void;
11+
onSubmit: (_event: React.FormEvent) => void;
1212
onToggleDebug: () => void;
1313
onCancel: () => void;
1414
currentSessionId: string | null;

torchci/components/TorchAgentPage/WelcomeSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ interface WelcomeSectionProps {
77
query: string;
88
isLoading: boolean;
99
debugVisible: boolean;
10-
onQueryChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
11-
onSubmit: (event: React.FormEvent) => void;
10+
onQueryChange: (_event: React.ChangeEvent<HTMLInputElement>) => void;
11+
onSubmit: (_event: React.FormEvent) => void;
1212
onToggleDebug: () => void;
1313
onCancel: () => void;
1414
}

torchci/components/TorchAgentPage/messageProcessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const processMessageLine = (
77
setParsedResponses: React.Dispatch<React.SetStateAction<ParsedContent[]>>,
88
isStreaming: boolean = false,
99
json?: any,
10-
onSessionIdReceived?: (sessionId: string) => void
10+
onSessionIdReceived?: (_sessionId: string) => void
1111
): void => {
1212
try {
1313
// If json is not provided, parse the line

torchci/components/TorchAgentPage/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const TodoListBlock = styled(Paper)(({ theme }) => ({
134134
overflow: "hidden",
135135
}));
136136

137-
export const TodoListTitle = styled(Typography)(({ theme }) => ({
137+
export const TodoListTitle = styled(Typography)(({ theme: _theme }) => ({
138138
fontFamily: "Roboto, 'Helvetica Neue', Arial, sans-serif",
139139
fontWeight: 500,
140140
marginBottom: "8px",
@@ -233,7 +233,7 @@ export const ChartHeader = styled(Box)(({ theme }) => ({
233233
backgroundColor: theme.palette.mode === "dark" ? "#1f1f1f" : "#f5f5f5",
234234
}));
235235

236-
export const ScrollToBottomButton = styled(Button)(({ theme }) => ({
236+
export const ScrollToBottomButton = styled(Button)(({ theme: _theme }) => ({
237237
position: "fixed",
238238
bottom: "20px",
239239
right: "20px",

torchci/components/TorchAgentPage/useMessageProcessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const useMessageProcessor = () => {
88
const [response, setResponse] = useState("");
99

1010
const processSessionData = useCallback(
11-
(sessionData: any, setCurrentSessionId?: (id: string) => void) => {
11+
(sessionData: any, setCurrentSessionId?: (_id: string) => void) => {
1212
if (sessionData.messages && Array.isArray(sessionData.messages)) {
1313
setParsedResponses([]);
1414

torchci/components/TorchAgentPage/utils.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ export const renderMarkdownWithLinks = (
246246
),
247247
th: ({ children, ...props }) => {
248248
// Filter out react-markdown specific props that conflict with HTML props
249+
// eslint-disable-next-line unused-imports/no-unused-vars
249250
const { node, ...htmlProps } = props as any;
250251
return (
251252
<th
@@ -264,6 +265,7 @@ export const renderMarkdownWithLinks = (
264265
},
265266
td: ({ children, ...props }) => {
266267
// Filter out react-markdown specific props that conflict with HTML props
268+
// eslint-disable-next-line unused-imports/no-unused-vars
267269
const { node, ...htmlProps } = props as any;
268270
return (
269271
<td

torchci/components/benchmark/compilers/BenchmarkLogs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function BenchmarkLogs({ workflowId }: { workflowId: number }) {
2020
JSON.stringify(queryParams)
2121
)}`;
2222

23-
let { data, error } = useSWR(url, fetcher, {
23+
let { data } = useSWR(url, fetcher, {
2424
refreshInterval: 60 * 60 * 1000, // refresh every hour
2525
});
2626

torchci/components/benchmark/compilers/ModelGraphPanel.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export function GraphPanel({
2323
queryName,
2424
queryParams,
2525
granularity,
26-
compiler,
2726
model,
2827
branch,
2928
lCommit,
@@ -32,7 +31,6 @@ export function GraphPanel({
3231
queryName: string;
3332
queryParams: { [key: string]: any };
3433
granularity: Granularity;
35-
compiler: string;
3634
model: string;
3735
branch: string;
3836
lCommit: string;
@@ -46,7 +44,7 @@ export function GraphPanel({
4644
JSON.stringify(queryParamsWithBranch)
4745
)}`;
4846

49-
let { data, error } = useSWR(url, fetcher, {
47+
let { data } = useSWR(url, fetcher, {
5048
refreshInterval: 60 * 60 * 1000, // refresh every hour
5149
});
5250
data = convertToCompilerPerformanceData(data);

torchci/pages/api/benchmark/list_commits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default async function handler(
2929

3030
// get time series data
3131
try {
32-
const { name, query_params, response_formats, data_type } = params;
32+
const { name, query_params, response_formats } = params;
3333
const data = await getBenmarkCommits(name, query_params);
3434
if (!data) {
3535
console.error("No data found for", name);

0 commit comments

Comments
 (0)