Skip to content

Commit dc184ba

Browse files
committed
Add some logging for evals
1 parent 7b670f8 commit dc184ba

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

evals/git-evals/run-eval-set.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,21 @@ async function runEvalSet(options: {
203203
})
204204

205205
const settledResults = await Promise.allSettled(evalPromises)
206-
settledResults.forEach((res) => {
206+
settledResults.forEach((res, index) => {
207207
if (res.status === 'fulfilled') {
208208
results.push(res.value)
209+
} else {
210+
console.error(
211+
`❌ Eval config ${evalConfigs[index].name} was rejected:`,
212+
res.reason
213+
)
214+
results.push({
215+
name: evalConfigs[index].name,
216+
status: 'error' as const,
217+
error:
218+
res.reason instanceof Error ? res.reason.message : String(res.reason),
219+
duration: 0,
220+
})
209221
}
210222
})
211223

evals/git-evals/run-git-evals.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,15 @@ export async function runGitEvals(
311311
limit?: number,
312312
logToStdout: boolean = false
313313
): Promise<FullEvalLog> {
314+
console.log(`Loading eval data from: ${evalDataPath}`)
314315
const evalData = JSON.parse(
315316
fs.readFileSync(evalDataPath, 'utf-8')
316317
) as GitRepoEvalData
317318

319+
console.log(
320+
`Loaded ${evalData.evalCommits.length} eval commits from ${evalDataPath}`
321+
)
322+
318323
const { repoUrl } = evalData
319324

320325
// Extract repo name from URL or use provided testRepoName as fallback
@@ -345,7 +350,12 @@ export async function runGitEvals(
345350
? evalData.evalCommits.slice(0, limit)
346351
: evalData.evalCommits
347352

348-
console.log(`Running ${commitsToRun.length} evaluations...`)
353+
console.log(
354+
`Running ${commitsToRun.length} evaluations out of ${evalData.evalCommits.length} total commits...`
355+
)
356+
console.log(
357+
`Using concurrency limit: ${globalConcurrencyLimiter ? 'global limiter' : 'local limiter (20)'}`
358+
)
349359

350360
// Use global limiter if available, otherwise create a local one
351361
const limitConcurrency = globalConcurrencyLimiter || pLimit(20)
@@ -461,6 +471,20 @@ export async function runGitEvals(
461471

462472
const results = await Promise.allSettled(evalPromises)
463473

474+
console.log(
475+
`Promise.allSettled completed. Results: ${results.length} total, ${results.filter((r) => r.status === 'fulfilled').length} fulfilled, ${results.filter((r) => r.status === 'rejected').length} rejected`
476+
)
477+
478+
// Log rejected promises for debugging
479+
results.forEach((result, index) => {
480+
if (result.status === 'rejected') {
481+
console.error(
482+
`❌ Eval ${index + 1}/${commitsToRun.length} (${commitsToRun[index].sha}) was rejected:`,
483+
result.reason
484+
)
485+
}
486+
})
487+
464488
const evalRuns = results
465489
.filter((result) => result.status === 'fulfilled')
466490
.map((result) => result.value)

0 commit comments

Comments
 (0)