dsh-livebench-panel 0.2.14 → 0.2.15
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 +8 -10
- package/lib/index.js +6 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -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 },
|
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) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-livebench-panel",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
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",
|