(queue)
| 72 | |
| 73 | let done = 0; |
| 74 | async function worker(queue) { |
| 75 | while (queue.length) { |
| 76 | const job = queue.shift(); |
| 77 | const v = await askJudge(job.prompt); |
| 78 | if (job.kind === 'e2e') job.r.e2e = v; else (job.r._fid ??= []).push(v); |
| 79 | console.error(` [${++done}/${jobs.length}] ${job.r.repo}/${job.r.arm}#${job.r.rep} ${job.kind}: ${v.verdict}${v.score != null ? ' ' + v.score : ''}`); |
| 80 | } |
| 81 | } |
| 82 | const q = [...jobs]; |
| 83 | await Promise.all(Array.from({ length: CONC }, () => worker(q))); |
| 84 |
no test coverage detected