Skip to content

Commit 5b48a2d

Browse files
authored
More small evals tweaks (#2620)
1 parent 89107b8 commit 5b48a2d

File tree

5 files changed

+45
-29
lines changed

5 files changed

+45
-29
lines changed

evals/apps/cli/src/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ const runUnitTest = async ({ task }: { task: Task }) => {
372372
})
373373

374374
console.log(
375-
`${Date.now()} [cli#runUnitTest | ${task.language} / ${task.exercise}] "${command.join(" ")}": ${subprocess.pid} -> ${JSON.stringify(descendants)}`,
375+
`${Date.now()} [cli#runUnitTest | ${task.language} / ${task.exercise}] "${command.join(" ")}": unit tests timed out, killing ${subprocess.pid} + ${JSON.stringify(descendants)}`,
376376
)
377377

378378
if (descendants.length > 0) {
@@ -384,7 +384,10 @@ const runUnitTest = async ({ task }: { task: Task }) => {
384384

385385
await execa`kill -9 ${descendant}`
386386
} catch (error) {
387-
console.error("Error killing descendant processes:", error)
387+
console.error(
388+
`${Date.now()} [cli#runUnitTest | ${task.language} / ${task.exercise}] Error killing descendant processes:`,
389+
error,
390+
)
388391
}
389392
}
390393
}
@@ -396,7 +399,10 @@ const runUnitTest = async ({ task }: { task: Task }) => {
396399
try {
397400
await execa`kill -9 ${subprocess.pid!}`
398401
} catch (error) {
399-
console.error("Error killing process:", error)
402+
console.error(
403+
`${Date.now()} [cli#runUnitTest | ${task.language} / ${task.exercise}] Error killing process:`,
404+
error,
405+
)
400406
}
401407
}, UNIT_TEST_TIMEOUT)
402408

evals/packages/db/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@libsql/client": "^0.14.0",
2424
"drizzle-orm": "^0.40.0",
2525
"drizzle-zod": "^0.7.0",
26+
"p-map": "^7.0.3",
2627
"zod": "^3.24.2"
2728
},
2829
"devDependencies": {

evals/packages/db/scripts/copy-run.mts

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { drizzle } from "drizzle-orm/libsql"
22
import { eq } from "drizzle-orm"
3+
import pMap from "p-map"
34

45
import { db as sourceDb } from "../src/db.js"
56
import { schema } from "../src/schema.js"
@@ -52,29 +53,33 @@ const copyRun = async (runId: number) => {
5253

5354
console.log(`Copying ${tasks.length} tasks`)
5455

55-
for (const task of tasks) {
56-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
57-
const { id: _, ...newTaskMetricsValues } = task.taskMetrics!
58-
const [newTaskMetrics] = await destDb.insert(schema.taskMetrics).values(newTaskMetricsValues).returning()
59-
60-
if (!newTaskMetrics) {
61-
throw new Error(`Failed to insert taskMetrics for task ${task.id}`)
62-
}
63-
64-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
65-
const { id: __, ...newTaskValues } = task
66-
67-
const [newTask] = await destDb
68-
.insert(schema.tasks)
69-
.values({ ...newTaskValues, runId: newRun.id, taskMetricsId: newTaskMetrics.id })
70-
.returning()
71-
72-
if (!newTask) {
73-
throw new Error(`Failed to insert task ${task.id}`)
74-
}
75-
}
76-
77-
console.log(`Successfully copied run ${runId} with ${tasks.length} tasks`)
56+
await pMap(
57+
tasks,
58+
async (task) => {
59+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
60+
const { id: _, ...newTaskMetricsValues } = task.taskMetrics!
61+
const [newTaskMetrics] = await destDb.insert(schema.taskMetrics).values(newTaskMetricsValues).returning()
62+
63+
if (!newTaskMetrics) {
64+
throw new Error(`Failed to insert taskMetrics for task ${task.id}`)
65+
}
66+
67+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
68+
const { id: __, ...newTaskValues } = task
69+
70+
const [newTask] = await destDb
71+
.insert(schema.tasks)
72+
.values({ ...newTaskValues, runId: newRun.id, taskMetricsId: newTaskMetrics.id })
73+
.returning()
74+
75+
if (!newTask) {
76+
throw new Error(`Failed to insert task ${task.id}`)
77+
}
78+
},
79+
{ concurrency: 25 },
80+
)
81+
82+
console.log(`\nSuccessfully copied run ${runId} with ${tasks.length} tasks`)
7883
}
7984

8085
const main = async () => {

evals/packages/types/src/roo-code-defaults.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const rooCodeDefaults: RooCodeSettings = {
66

77
// modelTemperature: null,
88
// reasoningEffort: "high",
9+
rateLimitSeconds: 0,
910

1011
pinnedApiConfigs: {},
1112
lastShownAnnouncementId: "apr-04-2025-boomerang",
@@ -45,11 +46,11 @@ export const rooCodeDefaults: RooCodeSettings = {
4546

4647
terminalOutputLineLimit: 500,
4748
terminalShellIntegrationTimeout: 15_000,
48-
// terminalCommandDelay: 0,
49-
// terminalPowershellCounter: false,
49+
terminalCommandDelay: 0,
50+
terminalPowershellCounter: false,
5051
terminalZshClearEolMark: true,
5152
terminalZshOhMy: true,
52-
// terminalZshP10k: false,
53+
terminalZshP10k: false,
5354
terminalZdotdir: true,
5455

5556
diffEnabled: true,

evals/pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)