dsh-livebench-panel 0.2.14 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +12 -14
- package/lib/index.js +12 -5
- package/package.json +2 -2
package/lib/client.js
CHANGED
|
@@ -539,10 +539,10 @@ window.__ModuleLoader__.load({
|
|
|
539
539
|
h("input", { className: c("input"), type: "number", min: 256, max: 32768, value: sel.maxTokens, onChange: setField("maxTokens") }),
|
|
540
540
|
),
|
|
541
541
|
h("div", { className: c("field") },
|
|
542
|
-
h("label", { className: c("label") }, "
|
|
542
|
+
h("label", { className: c("label") }, "题目序号范围(可选,0 起,含首尾)"),
|
|
543
543
|
h("div", { className: c("row"), style: { flexWrap: "nowrap" } },
|
|
544
|
-
h("input", { className: c("input"), type: "number", min: 0, placeholder: "
|
|
545
|
-
h("input", { className: c("input"), type: "number", min: 0, placeholder: "
|
|
544
|
+
h("input", { className: c("input"), type: "number", min: 0, placeholder: "起(含)", title: "起始题号(0 起,包含该题)", value: sel.begin, onChange: setField("begin"), style: { flex: "1", minWidth: "0" } }),
|
|
545
|
+
h("input", { className: c("input"), type: "number", min: 0, placeholder: "止(含)", title: "结束题号(包含该题);只填起不填止 = 从该题跑到底", value: sel.end, onChange: setField("end"), style: { flex: "1", minWidth: "0" } }),
|
|
546
546
|
),
|
|
547
547
|
h("div", { className: c("field") },
|
|
548
548
|
h("label", { className: c("label") }, "分类(可多选,不选 = 全部分类;括号内为该 release 下有效题数)"),
|
|
@@ -601,7 +601,7 @@ window.__ModuleLoader__.load({
|
|
|
601
601
|
h("div", { className: c("row") },
|
|
602
602
|
h("div", { className: c("cardHead") },
|
|
603
603
|
h("span", { className: c("label") }, `评测成绩(行 = 模型,列 = 任务)· ${sortedModels.length} 个模型 × ${matrix.tasks.length} 个任务`),
|
|
604
|
-
h("span", { className: c("hint") }, "分数 = 该任务平均分 ×100;括号 (
|
|
604
|
+
h("span", { className: c("hint") }, "分数 = 该任务平均分 ×100;括号 (-没做或没做完的题数/用户选择的题数,即题目序号范围的题数);× = 未执行该任务;— = 无有效判分(如全部访问失败,不计入正确率);颜色 ≥75 绿 / 40–75 橙 / <40 红;拖 ⠿ 换行序(存在本机),点表头按模型名或时间排序。"),
|
|
605
605
|
),
|
|
606
606
|
h("button", {
|
|
607
607
|
className: c("btn") + " " + c("btnDanger"),
|
|
@@ -683,21 +683,19 @@ window.__ModuleLoader__.load({
|
|
|
683
683
|
h("div", { className: c("cellSub") }, fmtTimeShort(startTime))),
|
|
684
684
|
matrix.tasks.map((taskKeyCol) => {
|
|
685
685
|
const row = matrix.cells.get(`${model}__@__${taskKeyCol}`);
|
|
686
|
-
// 单元格:上方正确率,下方 (
|
|
687
|
-
//
|
|
686
|
+
// 单元格:上方正确率,下方 (-没做或没做完的题数/用户选择的题数)。
|
|
687
|
+
// 「用户选择的题数」= 题目序号范围选定的题数(end 含端点)。
|
|
688
688
|
// 该任务总题数不参与正确率计算,故不展示。
|
|
689
|
-
const configuredCol = row ? (row.configured ?? 0) : (matrix.taskTotals[taskKeyCol] ?? 0);
|
|
690
|
-
const sub = `(-${row ? (row.notDone ?? 0) : configuredCol}/${configuredCol})`;
|
|
691
689
|
const cls = c("cellScore") + (matrix.groupStart.has(taskKeyCol) ? " " + c("grpStart") : "");
|
|
692
690
|
if (!row) {
|
|
693
|
-
return h("td", { key: taskKeyCol, className: cls, title:
|
|
694
|
-
h("div", { className: c("dim") }, "×")
|
|
695
|
-
h("div", { className: c("cellSub") }, sub));
|
|
691
|
+
return h("td", { key: taskKeyCol, className: cls, title: "未执行该任务" },
|
|
692
|
+
h("div", { className: c("dim") }, "×"));
|
|
696
693
|
}
|
|
694
|
+
const sub = `(-${row.notDone ?? 0}/${row.configured ?? 0})`;
|
|
697
695
|
const allFailed = row.answered > 0 && row.errors >= row.answered;
|
|
698
696
|
const title = allFailed
|
|
699
|
-
?
|
|
700
|
-
:
|
|
697
|
+
? `本次选择 ${row.configured ?? 0} 题,其中 ${row.errors} 题全部访问失败(未做完),不计入正确率 ${sub}`
|
|
698
|
+
: `本次选择 ${row.configured ?? 0} 题,做完 ${row.done ?? 0} 题,没做或没做完 ${row.notDone ?? 0} 题 ${sub}` +
|
|
701
699
|
(row.errors > 0 ? `(其中 ${row.errors} 题 API 失败)` : "");
|
|
702
700
|
if (allFailed || row.judged === 0) {
|
|
703
701
|
return h("td", { key: taskKeyCol, className: cls, title },
|
|
@@ -758,7 +756,7 @@ window.__ModuleLoader__.load({
|
|
|
758
756
|
h("tr", null, h("th", null, "分类 / 任务"), h("td", null,
|
|
759
757
|
"六大类共 18 个任务:coding(代码生成/补全)、math(竞赛数学等)、reasoning(空间推理/逻辑谜题)、language(拼写/连线/语义)、data_analysis(表格操作)、instruction_following(指令遵循)。首次验证推荐 language → typos。")),
|
|
760
758
|
h("tr", null, h("th", null, "题目序号范围"), h("td", null,
|
|
761
|
-
"从 0
|
|
759
|
+
"从 0 起,起止都包含。冒烟测试填 0 到 2(跑 3 题);只填「起」= 从该题跑到底。2 题得分噪声很大(对一题就是 0↔100 的波动),想看真实水平建议 20 题以上。")),
|
|
762
760
|
h("tr", null, h("th", null, "max-tokens"), h("td", null,
|
|
763
761
|
"单题回答的 token 上限,默认 32000。推理模型思考也占 token,不要低于 8192,否则思考被截断、答案为空会记 0 分。")),
|
|
764
762
|
),
|
package/lib/index.js
CHANGED
|
@@ -593,8 +593,12 @@ async function computeResults(dataDir) {
|
|
|
593
593
|
const judgedCount = entry?.n ?? 0;
|
|
594
594
|
// 做完的题 = 实际产出的有效答案(尝试数 - 访问失败数)
|
|
595
595
|
const done = Math.max(0, stat.answered - stat.errors);
|
|
596
|
-
//
|
|
597
|
-
|
|
596
|
+
// 选择题数 = 用户在「题目序号范围」里选择的题数(end 含端点)。
|
|
597
|
+
// 有元数据就直接用范围大小;没有元数据(历史数据)时用本次实际写入的答案行数兜底:
|
|
598
|
+
// LiveBench 会为范围内每一题写一行(访问失败也写 $ERROR$),所以跑完后
|
|
599
|
+
// answered 就等于本次选择的题数。绝不能用该任务总题数兜底 —— 用户只选了几题时
|
|
600
|
+
// 显示总题数毫无意义。
|
|
601
|
+
let configured = stat.answered;
|
|
598
602
|
const meta = runMeta.get(model);
|
|
599
603
|
if (meta !== undefined) {
|
|
600
604
|
const inScope = (meta.benchNames || []).some((bn) => {
|
|
@@ -830,7 +834,9 @@ function apply(ctx) {
|
|
|
830
834
|
args.push("--question-begin", String(asInt(body.begin, 0, 100000, 0)));
|
|
831
835
|
}
|
|
832
836
|
if (body.end !== undefined && body.end !== null && `${body.end}`.length > 0) {
|
|
833
|
-
|
|
837
|
+
// 面板的「止」按用户直觉是闭区间;LiveBench 的 --question-end 是开区间
|
|
838
|
+
// (gen_api_answer.py: questions[begin:end]),这里 +1 对齐,否则实际少跑一题。
|
|
839
|
+
args.push("--question-end", String(asInt(body.end, 0, 100000, 0) + 1));
|
|
834
840
|
}
|
|
835
841
|
if (body.resume === true) args.push("--resume");
|
|
836
842
|
if (body.retryFailures === true) args.push("--retry-failures");
|
|
@@ -880,8 +886,9 @@ function apply(ctx) {
|
|
|
880
886
|
}
|
|
881
887
|
}
|
|
882
888
|
|
|
883
|
-
// 记录本次评测的配置范围:/results 用它计算每个任务的"
|
|
884
|
-
//
|
|
889
|
+
// 记录本次评测的配置范围:/results 用它计算每个任务的"选择题数"。
|
|
890
|
+
// 注意 begin/end 存的是面板上的原始输入(闭区间,含首尾),
|
|
891
|
+
// 供 computeResults 算 end - begin + 1;传给 LiveBench 时 end 已 +1。
|
|
885
892
|
try {
|
|
886
893
|
const metaDir = join(layout.dataDir, ".dsh_runs");
|
|
887
894
|
if (!existsSync(metaDir)) mkdirSync(metaDir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-livebench-panel",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "DSH web plugin: a LiveBench tab in the Trajectory view (right of
|
|
3
|
+
"version": "0.2.16",
|
|
4
|
+
"description": "DSH web plugin: a LiveBench tab in the Trajectory view (right of ??/??). Run LiveBench evaluations against every model configured in the DeepSeek Harness ? pick provider/model, category, task, release and question range from dropdowns, watch progress, and read scores in place.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|