niceeval 0.6.2 → 0.7.0
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/INDEX.md +23 -23
- package/README.zh.md +6 -6
- package/dist/agents/types.d.ts +2 -2
- package/dist/i18n/zh-CN.d.ts +3 -3
- package/dist/report/aggregate.d.ts +32 -26
- package/dist/report/aggregate.js +157 -76
- package/dist/report/built-in/index.d.ts +2 -0
- package/dist/report/built-in/index.js +8 -0
- package/dist/report/components.d.ts +91 -164
- package/dist/report/components.js +377 -114
- package/dist/report/compute.d.ts +86 -73
- package/dist/report/compute.js +592 -432
- package/dist/report/flag.d.ts +28 -17
- package/dist/report/flag.js +86 -16
- package/dist/report/format.d.ts +11 -11
- package/dist/report/format.js +17 -15
- package/dist/report/index.d.ts +16 -17
- package/dist/report/index.js +20 -22
- package/dist/report/load.js +3 -2
- package/dist/report/locale.d.ts +49 -34
- package/dist/report/locale.js +106 -58
- package/dist/report/metrics.d.ts +10 -3
- package/dist/report/metrics.js +46 -12
- package/dist/report/primitives.d.ts +42 -15
- package/dist/report/primitives.js +135 -26
- package/dist/report/react/AttemptList.d.ts +10 -8
- package/dist/report/react/AttemptList.js +18 -10
- package/dist/report/react/DeltaTable.js +19 -18
- package/dist/report/react/EvalList.d.ts +3 -3
- package/dist/report/react/EvalList.js +0 -0
- package/dist/report/react/ExperimentComparison.d.ts +4 -2
- package/dist/report/react/ExperimentComparison.js +5 -4
- package/dist/report/react/ExperimentList.d.ts +3 -3
- package/dist/report/react/ExperimentList.js +16 -15
- package/dist/report/react/MetricBars.js +5 -4
- package/dist/report/react/MetricLine.js +12 -5
- package/dist/report/react/MetricMatrix.js +1 -1
- package/dist/report/react/MetricScatter.js +54 -17
- package/dist/report/react/MetricTable.js +2 -12
- package/dist/report/react/ScopeSummary.d.ts +10 -0
- package/dist/report/react/ScopeSummary.js +17 -0
- package/dist/report/react/Scoreboard.js +6 -6
- package/dist/report/react/cell.js +2 -2
- package/dist/report/react/fixtures.d.ts +5 -9
- package/dist/report/react/fixtures.js +105 -149
- package/dist/report/react/index.d.ts +15 -5
- package/dist/report/react/index.js +18 -7
- package/dist/report/report.d.ts +137 -20
- package/dist/report/report.js +261 -34
- package/dist/report/text/faces.d.ts +17 -19
- package/dist/report/text/faces.js +225 -157
- package/dist/report/text/plot.js +1 -1
- package/dist/report/text/table.js +2 -2
- package/dist/report/tree.d.ts +90 -40
- package/dist/report/tree.js +252 -94
- package/dist/report/types.d.ts +245 -300
- package/dist/report/types.js +4 -3
- package/dist/report/web.d.ts +21 -5
- package/dist/report/web.js +42 -16
- package/dist/results/select.d.ts +38 -16
- package/dist/results/select.js +73 -25
- package/dist/results/types.d.ts +38 -14
- package/dist/shared/aggregate.d.ts +3 -2
- package/dist/shared/aggregate.js +5 -4
- package/docs-site/zh/README.md +44 -0
- package/docs-site/zh/examples/ai-agent-application.mdx +63 -0
- package/docs-site/zh/examples/coding-agent-extensions.mdx +57 -0
- package/docs-site/zh/examples/index.mdx +50 -0
- package/docs-site/zh/{concepts → explanation}/adapter.mdx +11 -11
- package/docs-site/zh/{concepts → explanation}/assert.mdx +7 -7
- package/docs-site/zh/{concepts → explanation}/drive.mdx +8 -8
- package/docs-site/zh/{concepts → explanation}/evals.mdx +4 -4
- package/docs-site/zh/{concepts → explanation}/experiment.mdx +8 -8
- package/docs-site/zh/{concepts → explanation}/hitl.mdx +8 -8
- package/docs-site/zh/{concepts → explanation}/judge.mdx +5 -5
- package/docs-site/zh/{concepts → explanation}/overview.mdx +5 -5
- package/docs-site/zh/{guides → explanation}/runner.mdx +1 -1
- package/docs-site/zh/{concepts → explanation}/tier.mdx +6 -6
- package/docs-site/zh/{guides → how-to}/agent-feedback-loop.mdx +7 -7
- package/docs-site/zh/{guides → how-to}/authoring.mdx +2 -2
- package/docs-site/zh/{guides → how-to}/connect-otel.mdx +6 -6
- package/docs-site/zh/{guides → how-to}/connect-your-agent.mdx +18 -18
- package/docs-site/zh/{guides → how-to}/custom-reports.mdx +6 -6
- package/docs-site/zh/{guides → how-to}/experiments.mdx +3 -3
- package/docs-site/zh/{guides → how-to}/publish-report.mdx +2 -2
- package/docs-site/zh/{guides → how-to}/sandbox-agent.mdx +2 -2
- package/docs-site/zh/{guides → how-to}/sandbox-providers.mdx +1 -1
- package/docs-site/zh/{guides → how-to}/viewing-results.mdx +6 -6
- package/docs-site/zh/{guides → how-to}/write-experiment.mdx +3 -3
- package/docs-site/zh/{guides → how-to}/write-send.mdx +13 -13
- package/docs-site/zh/index.mdx +23 -25
- package/docs-site/zh/introduction.mdx +8 -8
- package/docs-site/zh/reference/builtin-agents.mdx +5 -5
- package/docs-site/zh/reference/capabilities.mdx +6 -6
- package/docs-site/zh/reference/cli.mdx +9 -7
- package/docs-site/zh/reference/define-agent.mdx +1 -1
- package/docs-site/zh/reference/events.mdx +3 -3
- package/docs-site/zh/{guides → reference}/official-adapters.mdx +7 -7
- package/docs-site/zh/{guides → reference}/report-components.mdx +5 -5
- package/docs-site/zh/{guides → reference}/results-data.mdx +5 -5
- package/docs-site/zh/{guides → troubleshooting}/debug-sandbox.mdx +2 -2
- package/docs-site/zh/{guides → troubleshooting}/debugging.mdx +4 -2
- package/docs-site/zh/{quickstart.mdx → tutorials/quickstart.mdx} +5 -17
- package/package.json +6 -2
- package/src/agents/index.ts +2 -2
- package/src/agents/openai-compat.ts +1 -1
- package/src/agents/streaming.ts +2 -2
- package/src/agents/types.ts +3 -3
- package/src/cli.ts +42 -23
- package/src/context/context.ts +1 -1
- package/src/context/session.test.ts +1 -1
- package/src/context/session.ts +1 -1
- package/src/i18n/en.ts +18 -16
- package/src/i18n/zh-CN.ts +16 -15
- package/src/report/aggregate.ts +175 -87
- package/src/report/built-in/index.tsx +9 -0
- package/src/report/components.tsx +625 -285
- package/src/report/compute.ts +717 -515
- package/src/report/dual-render.test.tsx +738 -1148
- package/src/report/flag.ts +97 -33
- package/src/report/format.ts +18 -22
- package/src/report/index.ts +113 -58
- package/src/report/load.ts +3 -2
- package/src/report/locale.ts +120 -69
- package/src/report/metrics.ts +42 -12
- package/src/report/primitives.tsx +190 -45
- package/src/report/react/AttemptList.tsx +32 -20
- package/src/report/react/DeltaTable.tsx +63 -45
- package/src/report/react/EvalList.tsx +0 -0
- package/src/report/react/ExperimentComparison.tsx +12 -7
- package/src/report/react/ExperimentList.tsx +38 -26
- package/src/report/react/MetricBars.tsx +5 -4
- package/src/report/react/MetricLine.tsx +13 -8
- package/src/report/react/MetricMatrix.tsx +2 -2
- package/src/report/react/MetricScatter.tsx +74 -20
- package/src/report/react/MetricTable.tsx +4 -76
- package/src/report/react/ScopeSummary.tsx +86 -0
- package/src/report/react/Scoreboard.tsx +28 -10
- package/src/report/react/cell.tsx +2 -2
- package/src/report/react/enhance.js +57 -5
- package/src/report/react/fixtures.ts +109 -156
- package/src/report/react/index.tsx +24 -39
- package/src/report/react/render.test.tsx +139 -104
- package/src/report/react/styles.css +181 -91
- package/src/report/report.test.ts +761 -1031
- package/src/report/report.ts +425 -47
- package/src/report/text/faces.ts +257 -164
- package/src/report/text/plot.ts +1 -1
- package/src/report/text/table.ts +2 -2
- package/src/report/tree.ts +362 -104
- package/src/report/types.ts +257 -287
- package/src/report/web.ts +63 -20
- package/src/results/attempt-evidence.test.ts +4 -4
- package/src/results/attempt-evidence.ts +5 -5
- package/src/results/copy.ts +6 -6
- package/src/results/host-equivalence.test.ts +26 -14
- package/src/results/index.ts +10 -4
- package/src/results/open.ts +8 -4
- package/src/results/results.test.ts +4 -3
- package/src/results/select.ts +104 -34
- package/src/results/types.ts +36 -14
- package/src/runner/feedback/human.test.ts +1 -1
- package/src/runner/run.ts +1 -1
- package/src/sandbox/cli-commands.ts +2 -2
- package/src/scoring/judge.test.ts +1 -1
- package/src/shared/aggregate.ts +5 -4
- package/src/show/compose.ts +50 -67
- package/src/show/index.ts +107 -56
- package/src/show/render.ts +43 -27
- package/src/show/report-host.test.ts +188 -0
- package/src/show/report-host.ts +375 -0
- package/src/show/show.test.ts +86 -36
- package/src/view/app/App.test.tsx +69 -0
- package/src/view/app/App.tsx +144 -48
- package/src/view/app/components/AttemptModal.tsx +324 -63
- package/src/view/app/components/CodeView.tsx +10 -4
- package/src/view/app/i18n.ts +31 -17
- package/src/view/app/main.tsx +13 -8
- package/src/view/app/pages/{RunsPage.tsx → AttemptsPage.tsx} +6 -6
- package/src/view/app/types.ts +4 -1
- package/src/view/client-dist/app.css +1 -1
- package/src/view/client-dist/app.js +14 -14
- package/src/view/data.test.ts +9 -3
- package/src/view/data.ts +145 -49
- package/src/view/index.ts +48 -44
- package/src/view/server.ts +35 -15
- package/src/view/shared/types.ts +34 -5
- package/src/view/styles.css +224 -0
- package/src/view/view-report.test.ts +161 -57
- package/dist/report/built-ins/experiment-comparison.d.ts +0 -39
- package/dist/report/built-ins/experiment-comparison.js +0 -119
- package/dist/report/built-ins/index.d.ts +0 -2
- package/dist/report/built-ins/index.js +0 -2
- package/dist/report/react/GroupSummary.d.ts +0 -8
- package/dist/report/react/GroupSummary.js +0 -8
- package/dist/report/react/RunOverview.d.ts +0 -8
- package/dist/report/react/RunOverview.js +0 -12
- package/docs-site/zh/example/ai-agent-application.mdx +0 -152
- package/docs-site/zh/example/claude-code-codex-plugin.mdx +0 -167
- package/docs-site/zh/example/claude-code-codex-skill.mdx +0 -152
- package/docs-site/zh/example/showcase.mdx +0 -39
- package/src/report/built-in-user-parity.test.tsx +0 -597
- package/src/report/built-ins/experiment-comparison.tsx +0 -179
- package/src/report/built-ins/index.ts +0 -7
- package/src/report/react/GroupSummary.tsx +0 -66
- package/src/report/react/RunOverview.tsx +0 -109
- /package/docs-site/zh/{example/tier1-ai-sdk-v7.mdx → examples/integrations/ai-sdk-v7.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-claude-sdk.mdx → examples/integrations/claude-sdk.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-codex-sdk.mdx → examples/integrations/codex-sdk.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-langgraph.mdx → examples/integrations/langgraph.mdx} +0 -0
- /package/docs-site/zh/{example/tier1-pi-sdk.mdx → examples/integrations/pi-sdk.mdx} +0 -0
- /package/docs-site/zh/{guides → how-to}/ci-integration.mdx +0 -0
- /package/docs-site/zh/{guides → how-to}/dataset-fanout.mdx +0 -0
- /package/docs-site/zh/{guides → how-to}/fixtures.mdx +0 -0
- /package/docs-site/zh/{guides → how-to}/reporters.mdx +0 -0
- /package/docs-site/zh/{guides → how-to}/scoring-guide.mdx +0 -0
package/dist/report/compute.d.ts
CHANGED
|
@@ -1,99 +1,112 @@
|
|
|
1
|
-
import type { AttemptListItem,
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** 行维度(内置 / 自定义 / flag())。 */
|
|
1
|
+
import type { AttemptListItem, DeltaData, DeltaPair, DimensionInput, EntityListDataOptions, EvalListItem, ExperimentComparisonData, ExperimentListItem, FlagPairs, LineData, MatrixData, Metric, NumericAxis, ReportInput, ScatterData, ScopeSummaryData, ScoreboardData, TableData } from "./types.ts";
|
|
2
|
+
import type { JsonValue } from "../types.ts";
|
|
3
|
+
export interface MetricTableOptions {
|
|
4
|
+
/** 行维度(内置 / 自定义 / flag() / runConfig())。 */
|
|
6
5
|
rows: DimensionInput;
|
|
7
|
-
/**
|
|
8
|
-
columns:
|
|
9
|
-
/** 构建时排序,方向随 better(higher 降序,「好」的一头在上);缺数据行沉底。两面同口径,预排即终排。 */
|
|
10
|
-
sort?: Metric;
|
|
11
|
-
/** eval id 前缀过滤,同 CLI 位置参数语义。 */
|
|
12
|
-
evals?: string | string[];
|
|
13
|
-
}
|
|
14
|
-
/** 一次 attempt 的有界结果摘要:error → skipReason → 一条主失败断言 + 其余失败计数。 */
|
|
15
|
-
export declare function reasonFor(result: EvalResult): string | undefined;
|
|
16
|
-
export declare function tableData<const M extends readonly Metric[]>(input: SnapshotsInput, opts: TableDataOptions<M>): Promise<TableData<M[number]["name"]>>;
|
|
17
|
-
export interface AttemptListDataOptions {
|
|
6
|
+
/** 每列一个指标;非空元组,元素是静态 import 的 Metric 实例。 */
|
|
7
|
+
columns: readonly [Metric, ...Metric[]];
|
|
18
8
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* operation 等身份和分类字段不经它。只作用于这次计算产出的组件数据,不改盘上 artifact。
|
|
9
|
+
* 初始行序:必须是 columns 中同一个 Metric 实例且声明了 better,方向随 better
|
|
10
|
+
* (「好」的一头在上),缺数据行沉底;省略时按行 key 字典序。
|
|
22
11
|
*/
|
|
23
|
-
|
|
12
|
+
sort?: Metric;
|
|
13
|
+
/** eval id 前缀过滤,同 CLI 位置参数语义;在聚合之前收窄题集。 */
|
|
14
|
+
evals?: string | readonly string[];
|
|
24
15
|
}
|
|
25
|
-
|
|
26
|
-
export
|
|
27
|
-
/** `EvalList.data(selection)`:每个 `experimentId + evalId` 一项,按 evalId 再按 experimentId 升序。 */
|
|
28
|
-
export declare function evalListData(input: SnapshotsInput): Promise<EvalListItem[]>;
|
|
29
|
-
/** `ExperimentList.data(selection)`:每个 experiment 一项,按 experimentId 升序;展开到每道 Eval。 */
|
|
30
|
-
export declare function experimentListData(input: SnapshotsInput): Promise<ExperimentListItem[]>;
|
|
31
|
-
export interface MatrixDataOptions {
|
|
16
|
+
export declare function metricTableData(input: ReportInput, options: MetricTableOptions): Promise<TableData>;
|
|
17
|
+
export interface MetricMatrixOptions {
|
|
32
18
|
rows: DimensionInput;
|
|
33
19
|
columns: DimensionInput;
|
|
34
20
|
cell: Metric;
|
|
35
21
|
/** eval id 前缀过滤,同 CLI 位置参数语义。 */
|
|
36
|
-
evals?: string | string[];
|
|
22
|
+
evals?: string | readonly string[];
|
|
37
23
|
}
|
|
38
|
-
export declare function
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
export declare function metricMatrixData(input: ReportInput, options: MetricMatrixOptions): Promise<MatrixData>;
|
|
25
|
+
/** `attemptListData(input)`:每个 Attempt 一项,顺序取自 Scope 展平顺序(不重排)。 */
|
|
26
|
+
export declare function attemptListData(input: ReportInput, options?: EntityListDataOptions): Promise<AttemptListItem[]>;
|
|
27
|
+
/** `evalListData(input)`:每个 `experimentId + evalId` 一项,按 evalId 再按 experimentId 升序。 */
|
|
28
|
+
export declare function evalListData(input: ReportInput, options?: EntityListDataOptions): Promise<EvalListItem[]>;
|
|
29
|
+
/**
|
|
30
|
+
* `experimentListData(input)`:每个 experiment 一项,展开到每道 Eval;初始按端到端成功率
|
|
31
|
+
* 从高到低(缺数据沉底,同分按 id)。一行只有一套 agent / model / flags 是输入约束:
|
|
32
|
+
* 宿主注入的 current() Scope 保证每个 experiment 只由可比性配置一致的快照拼成;作者自选
|
|
33
|
+
* Snapshot[] 时若同一 experiment 混入不一致的可比性配置,按完整用户反馈失败并指引——
|
|
34
|
+
* 看跨配置演化用 snapshot 维度或 MetricLine,不把两套配置拼成一行冒充单一配置。
|
|
35
|
+
*/
|
|
36
|
+
export declare function experimentListData(input: ReportInput, options?: EntityListDataOptions): Promise<ExperimentListItem[]>;
|
|
37
|
+
/**
|
|
38
|
+
* `scopeSummaryData(input)`:范围摘要——快照时间窗、experiment / eval / attempt 数、
|
|
39
|
+
* 两级判定计票、端到端成功率与总成本(docs/feature/reports/library/summaries.md)。
|
|
40
|
+
* data 恒携带两级计票;成功率来自官方两级指标引擎,不从任一计票重算。
|
|
41
|
+
*/
|
|
42
|
+
export declare function scopeSummaryData(input: ReportInput): Promise<ScopeSummaryData>;
|
|
43
|
+
/** 完整父路径是组键;没有父路径的 experiment 不能互相比,自己形成单例组。 */
|
|
44
|
+
export declare function experimentComparisonGroupKey(experimentId: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* `experimentComparisonData(input)`:先把 input 按可比组分区(experiment id 的完整父路径),
|
|
47
|
+
* 再为每组分别计算 ScopeSummary、成本 × 端到端成功率散点和 ExperimentList——分区发生在任何
|
|
48
|
+
* 指标计算之前,组外 attempt 不可能污染该组的坐标尺度、series、成功率、成本、排序或缺数据计数。
|
|
49
|
+
*/
|
|
50
|
+
export declare function experimentComparisonData(input: ReportInput): Promise<ExperimentComparisonData>;
|
|
51
|
+
export interface ScoreboardOptions {
|
|
41
52
|
rows: DimensionInput;
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
/** eval id
|
|
45
|
-
|
|
46
|
-
/**
|
|
53
|
+
/** 固定题集;eval id 必须唯一。元素引用运行时数据,类型放宽为普通数组,空数组在计算时报错。 */
|
|
54
|
+
questions: readonly string[];
|
|
55
|
+
/** 分科函数;默认与 evalGroup 维度同一条规则:取 eval id 的完整父路径,无 `/` 取完整 id。 */
|
|
56
|
+
subject?: (evalId: string) => string;
|
|
57
|
+
/** 权重按 eval id 前缀匹配,多个命中时最长前缀生效;默认 1。 */
|
|
58
|
+
weights?: Readonly<Record<string, number>>;
|
|
47
59
|
fullMarks?: number;
|
|
48
|
-
/** 每题得分指标;缺省即 examScore,可换自定义(如「答对但超预算扣分」)。 */
|
|
49
60
|
score?: Metric;
|
|
50
|
-
/** 选中范围:eval id 前缀过滤;题集(分母)只遍历这个范围。 */
|
|
51
|
-
evals?: string | string[];
|
|
52
61
|
}
|
|
53
62
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* 没跑到的题挣 0 分但留在分母里,missing 如实报 —— 这是显式的考试契约,不是「null ≠ 0」的例外。
|
|
63
|
+
* 固定题集分母:未跑题按 0 分计入 `notRun`,跑了但指标为 null 的题按 0 分计入 `unscorable`,
|
|
64
|
+
* 两个计数不合并——成绩单能回答「这 0 分是没去考还是考了判不了」。组件不从已观测 attempt
|
|
65
|
+
* 的并集猜分母;Scope 中题集之外的 eval 被忽略并计入 `ignoredEvals`。
|
|
58
66
|
*/
|
|
59
|
-
export declare function scoreboardData(input:
|
|
60
|
-
export interface
|
|
67
|
+
export declare function scoreboardData(input: ReportInput, options: ScoreboardOptions): Promise<ScoreboardData>;
|
|
68
|
+
export interface MetricScatterOptions {
|
|
61
69
|
/** 点维度:每个点 = 该组 attempt 的聚合。 */
|
|
62
70
|
points: DimensionInput;
|
|
63
|
-
/**
|
|
71
|
+
/** 可选:只决定颜色和分组,默认不连线。 */
|
|
64
72
|
series?: DimensionInput;
|
|
65
73
|
x: Metric;
|
|
66
74
|
y: Metric;
|
|
75
|
+
/** eval id 前缀过滤,同 CLI 位置参数语义。 */
|
|
76
|
+
evals?: string | readonly string[];
|
|
67
77
|
}
|
|
68
|
-
export declare function
|
|
69
|
-
export interface
|
|
70
|
-
/** x 轴:
|
|
71
|
-
x:
|
|
72
|
-
y: Metric;
|
|
73
|
-
/** 可选:每个系列一条线(flag / config 或普通维度);省略 = 单系列。 */
|
|
78
|
+
export declare function metricScatterData(input: ReportInput, options: MetricScatterOptions): Promise<ScatterData>;
|
|
79
|
+
export interface MetricLineOptions {
|
|
80
|
+
/** x 轴:NumericAxis(numericFlag() / numericRunConfig() 或自定义 of),不解析 experiment 命名。 */
|
|
81
|
+
x: NumericAxis;
|
|
74
82
|
series?: DimensionInput;
|
|
83
|
+
y: Metric;
|
|
84
|
+
/** eval id 前缀过滤,同 CLI 位置参数语义。 */
|
|
85
|
+
evals?: string | readonly string[];
|
|
75
86
|
}
|
|
76
|
-
/** 每个点 = 一个 experiment 的聚合;同系列的点按 x 排序连线(排序在组件面,数据保持分组序)。 */
|
|
77
|
-
export declare function lineData(input: SnapshotsInput, opts: LineDataOptions): Promise<LineData>;
|
|
78
|
-
/** Selection 的 warnings 随行进 OverviewData,RunOverview 直接渲染 —— 诚实不靠使用者记得接线。 */
|
|
79
|
-
export declare function overviewData(input: SnapshotsInput): Promise<OverviewData>;
|
|
80
87
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
88
|
+
* 点身份 = (series, x):落进同一桶的全部 attempt 先在各自 experiment × eval 内 perEval 聚合,
|
|
89
|
+
* 再 acrossEvals 跨题折成该点唯一的 y——聚合顺序是 (series, x, experiment, eval),同一桶里有
|
|
90
|
+
* 多个 experiment 时它们合成一个点,不画垂直来回线。前提是 x 在同一 experiment × eval 内恒定:
|
|
91
|
+
* 自定义 NumericAxis.of() 对同一 experiment × eval 的不同 attempt 返回不同值时按完整用户反馈失败。
|
|
92
|
+
* x 为 null 的 attempt 不伪造 x 值,归入该 series 的未绘制行,组件报告未绘制数量。
|
|
85
93
|
*/
|
|
86
|
-
export declare function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
export declare function metricLineData(input: ReportInput, options: MetricLineOptions): Promise<LineData>;
|
|
95
|
+
/**
|
|
96
|
+
* 按 flag 派生 A/B 对(docs/feature/reports/library/metric-views.md「DeltaTable」):
|
|
97
|
+
* 配对域 = 同可比组 + 删除该 flag 后可比性配置深相等;a 取 baseline(缺省 = 未声明该 flag),
|
|
98
|
+
* b 侧该 flag 的每个其它取值各成一对;label 自动 `<a 末段> · <flag>=<显示键>`。
|
|
99
|
+
*/
|
|
100
|
+
export declare function pairsByFlag(name: string, options?: {
|
|
101
|
+
baseline?: JsonValue;
|
|
102
|
+
}): FlagPairs;
|
|
103
|
+
export interface DeltaTableOptions {
|
|
104
|
+
/** 显式维度,必填——"baseline" 不会被猜成 experiment、agent、flag 或 snapshot 中的某一种。 */
|
|
105
|
+
by: DimensionInput;
|
|
106
|
+
/** 字面 pair 数组(自定义 label),或 pairsByFlag() 的派生声明;空数组在计算时报错。 */
|
|
107
|
+
pairs: readonly DeltaPair[] | FlagPairs;
|
|
108
|
+
metrics: readonly [Metric, ...Metric[]];
|
|
109
|
+
/** eval id 前缀过滤,同 CLI 位置参数语义。 */
|
|
110
|
+
evals?: string | readonly string[];
|
|
98
111
|
}
|
|
99
|
-
export declare function
|
|
112
|
+
export declare function deltaTableData(input: ReportInput, options: DeltaTableOptions): Promise<DeltaData>;
|