Skip to content

Commit 869fb89

Browse files
authored
fix(benchmark): set default agent timeout -> 2 hours (#162)
## Description - set default agent timeout -> 2 hours - print configured timeout when launching for maximum awareness <!-- Mark the relevant option with an 'x' --> - [x] Bug fix (non-breaking change which fixes an issue) ## Related Issues <!-- Link to related issues using #issue-number --> Closes # ## Changes Made <!-- Describe the changes in detail --> ## Testing <!-- Describe how you tested your changes --> - [ ] I have tested locally - [ ] I have added/updated tests - [ ] All existing tests pass ## Checklist - [ ] My code follows the code style of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published ## Screenshots (if applicable) <!-- Add screenshots to help explain your changes --> ## Additional Notes <!-- Any additional information that reviewers should know -->
1 parent 350624f commit 869fb89

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/commands/benchmark-job/run.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,7 @@ export async function runBenchmarkJob(options: RunOptions) {
326326
const agentConfigs = parsedAgents.map((agent) => ({
327327
name: agent.name,
328328
modelName: agent.model,
329-
timeoutSeconds: options.timeout
330-
? parseInt(options.timeout, 10)
331-
: undefined,
329+
timeoutSeconds: options.timeout ? parseInt(options.timeout, 10) : 7200, // Default to 2 hours
332330
environmentVariables:
333331
Object.keys(providedEnvVars).length > 0 ? providedEnvVars : undefined,
334332
secrets,
@@ -345,7 +343,9 @@ export async function runBenchmarkJob(options: RunOptions) {
345343

346344
// Output result
347345
if (!options.output || options.output === "text") {
348-
console.log(`Benchmark job created: ${job.id}`);
346+
console.log(
347+
`Benchmark job created: ${job.id} (agent timeout = ${agentConfigs[0].timeoutSeconds}s)`,
348+
);
349349
console.log(`Follow the run with rli benchmark-job watch ${job.id}`);
350350
} else {
351351
output(job, { format: options.output, defaultFormat: "json" });

src/screens/BenchmarkJobCreateScreen.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,8 @@ export function BenchmarkJobCreateScreen({
539539
if (!isNaN(timeout) && timeout > 0) {
540540
config.timeoutSeconds = timeout;
541541
}
542+
} else {
543+
config.timeoutSeconds = 7200; // Default to 2 hours
542544
}
543545

544546
return config;

0 commit comments

Comments
 (0)