Skip to content

Commit a2e06b3

Browse files
committed
simplify some logs
1 parent 1233cd1 commit a2e06b3

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

evals/git-evals2/example.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@ async function main() {
2424
}
2525
},
2626
})
27-
28-
console.log('\n=== Final Results ===')
29-
console.log(`Total duration: ${(results.totalDuration / 1000).toFixed(1)}s\n`)
30-
31-
for (const [agentId, data] of results.agents) {
32-
console.log(`${agentId}:`)
33-
console.log(` Score: ${data.averageScore.toFixed(2)}/10`)
34-
console.log(` Cost: $${data.averageCost.toFixed(4)}`)
35-
console.log(` Duration: ${(data.averageDuration / 1000).toFixed(1)}s`)
36-
console.log(
37-
` Success: ${data.runs.filter((r) => !r.error).length}/${data.runs.length}`,
38-
)
39-
console.log()
40-
}
4127
}
4228

4329
if (import.meta.main) {

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,13 @@ export async function runGitEvals2(
9494
}
9595

9696
// Save trace to logs directory
97+
const safeSpec = commit.spec
98+
.split('\n')[0]
99+
.replace(/[^a-zA-Z0-9]/g, '_')
100+
.slice(0, 30)
97101
const safeAgentId = agentId.replace(/[^a-zA-Z0-9-]/g, '_')
98102
const safeCommitShort = commit.sha.slice(0, 7)
99-
const traceFilename = `${safeAgentId}-${safeCommitShort}.json`
103+
const traceFilename = `${safeSpec}-${safeAgentId}-${safeCommitShort}.json`
100104
const tracePath = path.join(logsDir, traceFilename)
101105

102106
const traceData = {
@@ -206,13 +210,11 @@ export async function runGitEvals2(
206210
console.log('\n=== Summary ===')
207211
for (const [agentId, data] of results) {
208212
console.log(`\n${agentId}:`)
209-
console.log(` Average Score: ${data.averageScore.toFixed(2)}/10`)
210-
console.log(` Average Cost: $${data.averageCost.toFixed(4)}`)
213+
console.log(` Score: ${data.averageScore.toFixed(2)}/10`)
214+
console.log(` Cost: $${data.averageCost.toFixed(4)}`)
215+
console.log(` Duration: ${(data.averageDuration / 1000).toFixed(1)}s`)
211216
console.log(
212-
` Average Duration: ${(data.averageDuration / 1000).toFixed(1)}s`,
213-
)
214-
console.log(
215-
` Success Rate: ${data.runs.filter((r) => !r.error).length}/${data.runs.length}`,
217+
` Success: ${data.runs.filter((r) => !r.error).length}/${data.runs.length}`,
216218
)
217219
}
218220

evals/subagents/test-repo-utils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ export const withTestRepo = async <T>(
2323
const repoDir = path.join(tempDir, 'repo')
2424

2525
try {
26-
console.log(
27-
`Cloning repository ${repoUrl} at commit ${parentSha} to ${repoDir} (shallow)...`,
28-
)
2926
execSync(`git clone --depth 1 ${repoUrl} ${repoDir}`, { stdio: 'ignore' })
3027

3128
execSync(`git fetch --depth 1 origin ${parentSha}`, {

0 commit comments

Comments
 (0)