Skip to content

Commit 9a3d9be

Browse files
author
Frank
committed
prettier
1 parent f423ebd commit 9a3d9be

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"prettier.trailingComma": "all"
2+
"prettier.trailingComma": "all",
3+
"prettier.printWidth": 80,
34
}

cli.ts

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ async function handlePrompts(args: string[]): Promise<void> {
158158
);
159159
console.log("");
160160
console.log("Examples:");
161-
console.log(" orvl prompts --eval DataDog/datadog-lambda-python@93d4a07..d776378");
161+
console.log(
162+
" orvl prompts --eval DataDog/datadog-lambda-python@93d4a07..d776378",
163+
);
162164
return;
163165
}
164166

@@ -312,7 +314,9 @@ async function main(): Promise<void> {
312314

313315
try {
314316
console.log(
315-
`${prefix} Starting episode (timeout: ${EPISODE_TIMEOUT_MS / 1000 / 60} min)...`,
317+
`${prefix} Starting episode (timeout: ${
318+
EPISODE_TIMEOUT_MS / 1000 / 60
319+
} min)...`,
316320
);
317321
console.log(`${prefix} Cloning repository...`);
318322
cwd = cloneRepositoryAtCommit(evalDefinition, baselineCommit);
@@ -374,7 +378,9 @@ async function main(): Promise<void> {
374378

375379
if (attempt < retries) {
376380
console.log(
377-
`${logPrefix} Retrying agent run (attempt ${attempt + 1}/${retries})...`,
381+
`${logPrefix} Retrying agent run (attempt ${
382+
attempt + 1
383+
}/${retries})...`,
378384
);
379385
}
380386
},
@@ -433,7 +439,13 @@ async function main(): Promise<void> {
433439
);
434440

435441
console.log(
436-
`${prefix} Episode completed with final score ${aggregationSummary.finalScore.toFixed(3)} (base ${aggregationSummary.baseScore.toFixed(3)} - variance penalty ${aggregationSummary.variancePenalty.toFixed(3)})`,
442+
`${prefix} Episode completed with final score ${aggregationSummary.finalScore.toFixed(
443+
3,
444+
)} (base ${aggregationSummary.baseScore.toFixed(
445+
3,
446+
)} - variance penalty ${aggregationSummary.variancePenalty.toFixed(
447+
3,
448+
)})`,
437449
);
438450

439451
return {
@@ -456,7 +468,9 @@ async function main(): Promise<void> {
456468
Array.from({ length: EPISODES }, (_, offset) =>
457469
withTimeout(() => runEpisode(offset + 1), {
458470
timeoutMs: EPISODE_TIMEOUT_MS,
459-
timeoutMessage: `Episode ${offset + 1} timed out after ${EPISODE_TIMEOUT_MS / 1000 / 60} minutes`,
471+
timeoutMessage: `Episode ${offset + 1} timed out after ${
472+
EPISODE_TIMEOUT_MS / 1000 / 60
473+
} minutes`,
460474
}),
461475
),
462476
);
@@ -479,7 +493,9 @@ async function main(): Promise<void> {
479493

480494
if (episodeResults.length < EPISODES) {
481495
throw new Error(
482-
`Expected ${EPISODES} episodes to complete, but only ${episodeResults.length} succeeded:\n${episodeFailures.join("\n")}`,
496+
`Expected ${EPISODES} episodes to complete, but only ${
497+
episodeResults.length
498+
} succeeded:\n${episodeFailures.join("\n")}`,
483499
);
484500
}
485501

@@ -568,12 +584,20 @@ async function main(): Promise<void> {
568584
console.log("[debug] Episode recap:");
569585
episodes.forEach((episode, index) => {
570586
console.log(
571-
`[debug] Episode ${index + 1}: final ${episode.finalScore.toFixed(3)} (base ${episode.baseScore.toFixed(3)} - penalty ${episode.variancePenalty.toFixed(3)})`,
587+
`[debug] Episode ${index + 1}: final ${episode.finalScore.toFixed(
588+
3,
589+
)} (base ${episode.baseScore.toFixed(
590+
3,
591+
)} - penalty ${episode.variancePenalty.toFixed(3)})`,
572592
);
573593
});
574594
}
575595
console.log(
576-
`[debug] Aggregate final: ${finalScore.toFixed(3)} (base ${baseScore.toFixed(3)} - penalty ${variancePenalty.toFixed(3)})`,
596+
`[debug] Aggregate final: ${finalScore.toFixed(
597+
3,
598+
)} (base ${baseScore.toFixed(3)} - penalty ${variancePenalty.toFixed(
599+
3,
600+
)})`,
577601
);
578602

579603
// Generate and log radar chart URL
@@ -773,20 +797,30 @@ function summarizeAggregation(
773797

774798
aggregation.perScore.forEach((entry) => {
775799
lines.push(
776-
` ${entry.assignment.name}${entry.averageScore.toFixed(3)} (weight ${formatRawWeight(entry.assignment.weight)}, normalized ${entry.normalizedWeight.toFixed(3)})`,
800+
` ${entry.assignment.name}${entry.averageScore.toFixed(
801+
3,
802+
)} (weight ${formatRawWeight(
803+
entry.assignment.weight,
804+
)}, normalized ${entry.normalizedWeight.toFixed(3)})`,
777805
);
778806
const raw = aggregationInputs.get(entry.assignment.name);
779807
if (raw) {
780808
raw.judgeResults.forEach((result) => {
781809
lines.push(
782-
` - ${result.judge.name}: ${result.score.toFixed(3)}${result.rationale}`,
810+
` - ${result.judge.name}: ${result.score.toFixed(3)}${
811+
result.rationale
812+
}`,
783813
);
784814
});
785815
}
786816
});
787817

788818
lines.push(
789-
` Final aggregate score: ${aggregation.finalScore.toFixed(3)} (base ${aggregation.baseScore.toFixed(3)} - penalty ${aggregation.variancePenalty.toFixed(3)})\n`,
819+
` Final aggregate score: ${aggregation.finalScore.toFixed(
820+
3,
821+
)} (base ${aggregation.baseScore.toFixed(
822+
3,
823+
)} - penalty ${aggregation.variancePenalty.toFixed(3)})\n`,
790824
);
791825

792826
const scoreExports = buildScoreExportsFromEpisodes(episodes);

0 commit comments

Comments
 (0)