import { join } from "node:path"; import { launch, newEvalDir, writeConfig } from "../lib/study.ts"; // 用真模型、真 Docker 跑一次第零轮(任务书 12 第 5.2 节"同样的配置真实跑 3 次"):配置照 eval/round-zero/research.json, // 研究编号换成检验名字。研究在 <检验目录>/study,跑完用 quality.ts 打分。要花钱。 // node eval/round-zero/run.ts <名字> // 中途按 Ctrl-C 会把停下信号传给研究进程;接着跑用 node eval/lib/cli.ts --resume --dir <检验目录>/study。 const name = process.argv[2]; if (name === undefined) throw new Error("要写检验名字,例如 r0-real-1"); const out = newEvalDir(name); const config = writeConfig("eval/round-zero/research.json", join(out, "research.json"), name, null); const study = launch(config, join(out, "study"), {}); process.on("SIGINT", () => study.child.kill("SIGINT")); const { outcome } = await study.done; console.log(`\n结局:${JSON.stringify(outcome)}\n研究目录:${join(out, "study")}`);