Files
iomgaa 75d7cffd27 feat: flow 第 1 部分(骨架、研究开始、第零轮)与第零轮检验
按任务书 12 实现 src/flow:从账本现算下一步的纯函数、主循环、恢复入口、派模型任务和跑正式运行两个共用动作、冻结配置、基线、第零轮三个研究者阶段和入口分配,走到第 1 轮时停下。materials 导出 finalEntries、加 researcherId 和 StudyRecord。

审阅采纳两条:研究编号本机已用过时冻结前报错;docker run 没启动时写完结果就停下,不在本进程里无限起新编号。

eval/ 新增第零轮检验:起研究命令行、回放假模型、检验用 Jev 客户端、六问质量评估、16-real-1 回放、杀进程与两份同时跑。tsc 与 depcruise 也检查 eval/,新增 eval 只经 index.ts 用正式代码的规则。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:58:52 -04:00

17 lines
1.0 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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")}`);