Skip to content

Commit a7ee5a8

Browse files
authored
[HUD][ODC] Show gpu dev instructions even when the command can't be found (#7437)
Still show the gpu dev instructions even when the test repro command can't be found. This way people can still get a similar machine even when its unclear what failed so they can repro other things or just get an environment similar to CI Also fix a typo in the instruction item <img width="700" height="87" alt="image" src="https://github.com/user-attachments/assets/68af9f52-ce6c-4f2e-aa03-f763e94723f2" />
1 parent 0021389 commit a7ee5a8

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

torchci/components/job/ODCCommand.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,20 @@ export function ODCommandInstructions({
211211
/>
212212
<InstructionItem
213213
index={5}
214-
title="Download the binary"
214+
title="Run the test"
215215
component={
216-
<>
217-
<Typography variant="body1">Run the test</Typography>
218-
<TerminalCopyBox text={command} />
219-
</>
216+
command == undefined ? (
217+
<Typography variant="body1">
218+
We were unable to extract the test command from the job log.
219+
Please check the log manually to find the command to run the
220+
test.
221+
</Typography>
222+
) : (
223+
<>
224+
<Typography variant="body1">Run the test</Typography>
225+
<TerminalCopyBox text={command} />
226+
</>
227+
)
220228
}
221229
/>
222230
</Stack>
@@ -366,10 +374,10 @@ function useInformationFromJobLog(
366374
"To execute this test, run the following from the base repo dir:"
367375
)
368376
);
369-
if (reproCommandLine === -1) {
370-
return undefined;
371-
}
372-
const command = noTimeStampLogLines[reproCommandLine + 1].trim();
377+
const command =
378+
reproCommandLine === -1
379+
? undefined
380+
: noTimeStampLogLines[reproCommandLine + 1].trim();
373381

374382
// Machine type
375383
let gpuType: string = "CPU-X86";

0 commit comments

Comments
 (0)