@openpond/evals 0.8.0 → 0.9.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/README.md +36 -0
- package/dist/index.js +1 -0
- package/dist/learning/contracts.js +10 -0
- package/dist/metric-policy.js +50 -0
- package/dist/metrics-node.js +16 -0
- package/dist/metrics.js +105 -0
- package/dist/runs.js +12 -0
- package/dist/tasksets.js +5 -0
- package/dist/types/builtin-benchmarks/harness-refiner.d.ts +14 -0
- package/dist/types/builtin-benchmarks/harness-refiner.d.ts.map +1 -1
- package/dist/types/conformance.d.ts +28 -0
- package/dist/types/conformance.d.ts.map +1 -1
- package/dist/types/evidence/conformance.d.ts +4 -4
- package/dist/types/evidence/contracts.d.ts +8 -8
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/javascript-isolate.d.ts +1 -1
- package/dist/types/javascript-isolate.d.ts.map +1 -1
- package/dist/types/learning/admission.d.ts +3 -3
- package/dist/types/learning/contracts.d.ts +81 -3
- package/dist/types/learning/contracts.d.ts.map +1 -1
- package/dist/types/learning/operations.d.ts +88 -12
- package/dist/types/learning/operations.d.ts.map +1 -1
- package/dist/types/learning/repository.d.ts +45 -4
- package/dist/types/learning/repository.d.ts.map +1 -1
- package/dist/types/learning/transport.d.ts +90 -11
- package/dist/types/learning/transport.d.ts.map +1 -1
- package/dist/types/metric-policy.d.ts +112 -0
- package/dist/types/metric-policy.d.ts.map +1 -0
- package/dist/types/metrics-node.d.ts +8 -0
- package/dist/types/metrics-node.d.ts.map +1 -0
- package/dist/types/metrics.d.ts +37 -0
- package/dist/types/metrics.d.ts.map +1 -0
- package/dist/types/preferences.d.ts +3 -3
- package/dist/types/rewards.d.ts +9 -9
- package/dist/types/runs.d.ts +88 -0
- package/dist/types/runs.d.ts.map +1 -1
- package/dist/types/tasksets.d.ts +44 -0
- package/dist/types/tasksets.d.ts.map +1 -1
- package/package.json +9 -1
- package/schemas/learning/v1/command-request.schema.json +77 -46
- package/schemas/learning/v1/package.schema.json +108 -0
- package/schemas/learning/v1/source.schema.json +64 -33
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const TasksetMetricPolicySchema: z.ZodObject<{
|
|
3
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricPolicy.v1">;
|
|
4
|
+
primaryMetric: z.ZodString;
|
|
5
|
+
aggregation: z.ZodEnum<{
|
|
6
|
+
mean_score: "mean_score";
|
|
7
|
+
pass_rate: "pass_rate";
|
|
8
|
+
weighted_mean: "weighted_mean";
|
|
9
|
+
custom: "custom";
|
|
10
|
+
}>;
|
|
11
|
+
missingReward: z.ZodEnum<{
|
|
12
|
+
zero: "zero";
|
|
13
|
+
exclude: "exclude";
|
|
14
|
+
}>;
|
|
15
|
+
taskWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
16
|
+
customAggregator: z.ZodNullable<z.ZodObject<{
|
|
17
|
+
module: z.ZodString;
|
|
18
|
+
exportName: z.ZodString;
|
|
19
|
+
contentHash: z.ZodString;
|
|
20
|
+
timeoutMs: z.ZodNumber;
|
|
21
|
+
networkPolicy: z.ZodLiteral<"none">;
|
|
22
|
+
}, z.core.$strict>>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export declare const TasksetMetricResultContentSchema: z.ZodObject<{
|
|
25
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricResult.v1">;
|
|
26
|
+
runManifest: z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
contentHash: z.ZodString;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
tasksetRelease: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
contentHash: z.ZodString;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
policy: z.ZodObject<{
|
|
35
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricPolicy.v1">;
|
|
36
|
+
primaryMetric: z.ZodString;
|
|
37
|
+
aggregation: z.ZodEnum<{
|
|
38
|
+
mean_score: "mean_score";
|
|
39
|
+
pass_rate: "pass_rate";
|
|
40
|
+
weighted_mean: "weighted_mean";
|
|
41
|
+
custom: "custom";
|
|
42
|
+
}>;
|
|
43
|
+
missingReward: z.ZodEnum<{
|
|
44
|
+
zero: "zero";
|
|
45
|
+
exclude: "exclude";
|
|
46
|
+
}>;
|
|
47
|
+
taskWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
48
|
+
customAggregator: z.ZodNullable<z.ZodObject<{
|
|
49
|
+
module: z.ZodString;
|
|
50
|
+
exportName: z.ZodString;
|
|
51
|
+
contentHash: z.ZodString;
|
|
52
|
+
timeoutMs: z.ZodNumber;
|
|
53
|
+
networkPolicy: z.ZodLiteral<"none">;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
policyHash: z.ZodString;
|
|
57
|
+
receiptRefs: z.ZodArray<z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
contentHash: z.ZodString;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
includedCount: z.ZodNumber;
|
|
62
|
+
missingRewardCount: z.ZodNumber;
|
|
63
|
+
excludedCount: z.ZodNumber;
|
|
64
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
export declare const TasksetMetricResultSchema: z.ZodObject<{
|
|
67
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricResult.v1">;
|
|
68
|
+
runManifest: z.ZodObject<{
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
contentHash: z.ZodString;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
tasksetRelease: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
contentHash: z.ZodString;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
policy: z.ZodObject<{
|
|
77
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricPolicy.v1">;
|
|
78
|
+
primaryMetric: z.ZodString;
|
|
79
|
+
aggregation: z.ZodEnum<{
|
|
80
|
+
mean_score: "mean_score";
|
|
81
|
+
pass_rate: "pass_rate";
|
|
82
|
+
weighted_mean: "weighted_mean";
|
|
83
|
+
custom: "custom";
|
|
84
|
+
}>;
|
|
85
|
+
missingReward: z.ZodEnum<{
|
|
86
|
+
zero: "zero";
|
|
87
|
+
exclude: "exclude";
|
|
88
|
+
}>;
|
|
89
|
+
taskWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
90
|
+
customAggregator: z.ZodNullable<z.ZodObject<{
|
|
91
|
+
module: z.ZodString;
|
|
92
|
+
exportName: z.ZodString;
|
|
93
|
+
contentHash: z.ZodString;
|
|
94
|
+
timeoutMs: z.ZodNumber;
|
|
95
|
+
networkPolicy: z.ZodLiteral<"none">;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
policyHash: z.ZodString;
|
|
99
|
+
receiptRefs: z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
contentHash: z.ZodString;
|
|
102
|
+
}, z.core.$strict>>;
|
|
103
|
+
includedCount: z.ZodNumber;
|
|
104
|
+
missingRewardCount: z.ZodNumber;
|
|
105
|
+
excludedCount: z.ZodNumber;
|
|
106
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
107
|
+
contentHash: z.ZodString;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
export type TasksetMetricPolicy = z.infer<typeof TasksetMetricPolicySchema>;
|
|
110
|
+
export type TasksetMetricResult = z.infer<typeof TasksetMetricResultSchema>;
|
|
111
|
+
export declare function assertTasksetMetricResult(input: TasksetMetricResult): void;
|
|
112
|
+
//# sourceMappingURL=metric-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-policy.d.ts","sourceRoot":"","sources":["../../../../src/metric-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;kBAoBpC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWlC,CAAC;AACZ,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAuF,CAAC;AAC9H,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAU1E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type TasksetEvaluationInput, type TasksetMetricExecutionInput } from "./metrics.js";
|
|
2
|
+
import type { TasksetMetricResult } from "./metric-policy.js";
|
|
3
|
+
import type { EvaluationResult } from "./runs.js";
|
|
4
|
+
/** Verifies original source before stripping TS, then waits for worker termination
|
|
5
|
+
* on success, error or cancellation. Authored imports and host APIs are unavailable. */
|
|
6
|
+
export declare function executeTasksetMetricInWorker(input: TasksetMetricExecutionInput): Promise<TasksetMetricResult>;
|
|
7
|
+
export declare function aggregateTasksetEvaluationInWorker(input: TasksetEvaluationInput): Promise<EvaluationResult>;
|
|
8
|
+
//# sourceMappingURL=metrics-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics-node.d.ts","sourceRoot":"","sources":["../../../../src/metrics-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAA4D,KAAK,sBAAsB,EAAE,KAAK,2BAA2B,EAA8B,MAAM,cAAc,CAAC;AACnL,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;wFACwF;AACxF,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAE7G;AAED,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAE3G"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type AttemptReceipt, type EvaluationResult, type RunManifest } from "./runs.js";
|
|
2
|
+
import { type TasksetMetricPolicy, type TasksetMetricResult } from "./metric-policy.js";
|
|
3
|
+
import { type TasksetRelease } from "./tasksets.js";
|
|
4
|
+
export * from "./metric-policy.js";
|
|
5
|
+
export interface TasksetMetricExecutionInput {
|
|
6
|
+
manifest: RunManifest;
|
|
7
|
+
receipts: AttemptReceipt[];
|
|
8
|
+
policy: TasksetMetricPolicy;
|
|
9
|
+
/** Exact UTF-8 module bytes, verified before any compiler or executor sees them. */
|
|
10
|
+
source?: string;
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
}
|
|
13
|
+
export type TasksetMetricExecutor = (input: {
|
|
14
|
+
source: string;
|
|
15
|
+
module: string;
|
|
16
|
+
exportName: string;
|
|
17
|
+
scores: number[];
|
|
18
|
+
timeoutMs: number;
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
}) => Promise<unknown>;
|
|
21
|
+
export interface TasksetEvaluationInput extends Omit<TasksetMetricExecutionInput, "policy"> {
|
|
22
|
+
id: string;
|
|
23
|
+
taskset: TasksetRelease;
|
|
24
|
+
metadata?: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
/** Preflight the exact metric source before any model or tool execution. */
|
|
27
|
+
export declare function assertTasksetMetricSource(taskset: TasksetRelease, source?: string): void;
|
|
28
|
+
/** Bind the declared metric to one frozen release and population, retaining
|
|
29
|
+
* ordinary mean-score accounting independently of the authored calculation. */
|
|
30
|
+
export declare function aggregateTasksetEvaluationReceipts(input: TasksetEvaluationInput, executor?: TasksetMetricExecutor): Promise<EvaluationResult>;
|
|
31
|
+
/** Hosts supply the policy from the pinned Taskset, never a mutable form.
|
|
32
|
+
* Operational failures and nonterminal receipts are excluded for every policy.
|
|
33
|
+
* Missing rewards on the remaining receipts obey zero/exclude. A task's weight
|
|
34
|
+
* applies to each of its attempts; pass rate uses the grader's explicit verdict.
|
|
35
|
+
*/
|
|
36
|
+
export declare function executeTasksetMetric(input: TasksetMetricExecutionInput, executor?: TasksetMetricExecutor): Promise<TasksetMetricResult>;
|
|
37
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../../src/metrics.ts"],"names":[],"mappings":"AACA,OAAO,EAAwE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAC/J,OAAO,EAA0F,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAChL,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1E,cAAc,oBAAoB,CAAC;AAEnC,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEvB,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,2BAA2B,EAAE,QAAQ,CAAC;IACzF,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,4EAA4E;AAC5E,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAGxF;AAED;+EAC+E;AAC/E,wBAAsB,kCAAkC,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAOnJ;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,2BAA2B,EAAE,QAAQ,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA6D7I"}
|
|
@@ -20,8 +20,8 @@ export declare const PreferenceRewardScopeSchema: z.ZodEnum<{
|
|
|
20
20
|
synthetic_smoke: "synthetic_smoke";
|
|
21
21
|
}>;
|
|
22
22
|
export declare const PreferenceRendererSchema: z.ZodEnum<{
|
|
23
|
-
text: "text";
|
|
24
23
|
code: "code";
|
|
24
|
+
text: "text";
|
|
25
25
|
markdown: "markdown";
|
|
26
26
|
json: "json";
|
|
27
27
|
image: "image";
|
|
@@ -49,8 +49,8 @@ export declare const PreferenceComparisonReleaseContentSchema: z.ZodObject<{
|
|
|
49
49
|
}>;
|
|
50
50
|
path: z.ZodString;
|
|
51
51
|
renderer: z.ZodEnum<{
|
|
52
|
-
text: "text";
|
|
53
52
|
code: "code";
|
|
53
|
+
text: "text";
|
|
54
54
|
markdown: "markdown";
|
|
55
55
|
json: "json";
|
|
56
56
|
image: "image";
|
|
@@ -115,8 +115,8 @@ export declare const PreferenceComparisonReleaseSchema: z.ZodObject<{
|
|
|
115
115
|
}>;
|
|
116
116
|
path: z.ZodString;
|
|
117
117
|
renderer: z.ZodEnum<{
|
|
118
|
-
text: "text";
|
|
119
118
|
code: "code";
|
|
119
|
+
text: "text";
|
|
120
120
|
markdown: "markdown";
|
|
121
121
|
json: "json";
|
|
122
122
|
image: "image";
|
package/dist/types/rewards.d.ts
CHANGED
|
@@ -36,8 +36,10 @@ export declare const RewardImplementationSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
36
36
|
}, z.core.$strict>>;
|
|
37
37
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
38
38
|
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
-
|
|
39
|
+
exportName: z.ZodOptional<z.ZodString>;
|
|
40
|
+
timeoutMs: z.ZodNumber;
|
|
40
41
|
networkPolicy: z.ZodLiteral<"none">;
|
|
42
|
+
kind: z.ZodLiteral<"custom_verifier">;
|
|
41
43
|
verifierRef: z.ZodObject<{
|
|
42
44
|
id: z.ZodString;
|
|
43
45
|
path: z.ZodString;
|
|
@@ -50,8 +52,6 @@ export declare const RewardImplementationSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
50
52
|
host_private: "host_private";
|
|
51
53
|
}>;
|
|
52
54
|
}, z.core.$strict>;
|
|
53
|
-
exportName: z.ZodOptional<z.ZodString>;
|
|
54
|
-
timeoutMs: z.ZodNumber;
|
|
55
55
|
}, z.core.$strict>, z.ZodObject<{
|
|
56
56
|
kind: z.ZodLiteral<"human">;
|
|
57
57
|
rubricRef: z.ZodObject<{
|
|
@@ -127,8 +127,10 @@ export declare const RewardReleaseContentSchema: z.ZodObject<{
|
|
|
127
127
|
}, z.core.$strict>>;
|
|
128
128
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
129
129
|
}, z.core.$strict>, z.ZodObject<{
|
|
130
|
-
|
|
130
|
+
exportName: z.ZodOptional<z.ZodString>;
|
|
131
|
+
timeoutMs: z.ZodNumber;
|
|
131
132
|
networkPolicy: z.ZodLiteral<"none">;
|
|
133
|
+
kind: z.ZodLiteral<"custom_verifier">;
|
|
132
134
|
verifierRef: z.ZodObject<{
|
|
133
135
|
id: z.ZodString;
|
|
134
136
|
path: z.ZodString;
|
|
@@ -141,8 +143,6 @@ export declare const RewardReleaseContentSchema: z.ZodObject<{
|
|
|
141
143
|
host_private: "host_private";
|
|
142
144
|
}>;
|
|
143
145
|
}, z.core.$strict>;
|
|
144
|
-
exportName: z.ZodOptional<z.ZodString>;
|
|
145
|
-
timeoutMs: z.ZodNumber;
|
|
146
146
|
}, z.core.$strict>, z.ZodObject<{
|
|
147
147
|
kind: z.ZodLiteral<"human">;
|
|
148
148
|
rubricRef: z.ZodObject<{
|
|
@@ -247,8 +247,10 @@ export declare const RewardReleaseSchema: z.ZodObject<{
|
|
|
247
247
|
}, z.core.$strict>>;
|
|
248
248
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
249
249
|
}, z.core.$strict>, z.ZodObject<{
|
|
250
|
-
|
|
250
|
+
exportName: z.ZodOptional<z.ZodString>;
|
|
251
|
+
timeoutMs: z.ZodNumber;
|
|
251
252
|
networkPolicy: z.ZodLiteral<"none">;
|
|
253
|
+
kind: z.ZodLiteral<"custom_verifier">;
|
|
252
254
|
verifierRef: z.ZodObject<{
|
|
253
255
|
id: z.ZodString;
|
|
254
256
|
path: z.ZodString;
|
|
@@ -261,8 +263,6 @@ export declare const RewardReleaseSchema: z.ZodObject<{
|
|
|
261
263
|
host_private: "host_private";
|
|
262
264
|
}>;
|
|
263
265
|
}, z.core.$strict>;
|
|
264
|
-
exportName: z.ZodOptional<z.ZodString>;
|
|
265
|
-
timeoutMs: z.ZodNumber;
|
|
266
266
|
}, z.core.$strict>, z.ZodObject<{
|
|
267
267
|
kind: z.ZodLiteral<"human">;
|
|
268
268
|
rubricRef: z.ZodObject<{
|
package/dist/types/runs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type TasksetMetricResult } from "./metric-policy.js";
|
|
2
3
|
export declare const RuntimeTargetBindingSchema: z.ZodObject<{
|
|
3
4
|
adapterId: z.ZodString;
|
|
4
5
|
placement: z.ZodEnum<{
|
|
@@ -221,6 +222,49 @@ export declare const EvaluationResultContentSchema: z.ZodObject<{
|
|
|
221
222
|
timeout: "timeout";
|
|
222
223
|
cancelled: "cancelled";
|
|
223
224
|
}>, z.ZodNumber>;
|
|
225
|
+
authoredMetric: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricResult.v1">;
|
|
227
|
+
runManifest: z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
contentHash: z.ZodString;
|
|
230
|
+
}, z.core.$strict>;
|
|
231
|
+
tasksetRelease: z.ZodObject<{
|
|
232
|
+
id: z.ZodString;
|
|
233
|
+
contentHash: z.ZodString;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
policy: z.ZodObject<{
|
|
236
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricPolicy.v1">;
|
|
237
|
+
primaryMetric: z.ZodString;
|
|
238
|
+
aggregation: z.ZodEnum<{
|
|
239
|
+
mean_score: "mean_score";
|
|
240
|
+
pass_rate: "pass_rate";
|
|
241
|
+
weighted_mean: "weighted_mean";
|
|
242
|
+
custom: "custom";
|
|
243
|
+
}>;
|
|
244
|
+
missingReward: z.ZodEnum<{
|
|
245
|
+
zero: "zero";
|
|
246
|
+
exclude: "exclude";
|
|
247
|
+
}>;
|
|
248
|
+
taskWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
249
|
+
customAggregator: z.ZodNullable<z.ZodObject<{
|
|
250
|
+
module: z.ZodString;
|
|
251
|
+
exportName: z.ZodString;
|
|
252
|
+
contentHash: z.ZodString;
|
|
253
|
+
timeoutMs: z.ZodNumber;
|
|
254
|
+
networkPolicy: z.ZodLiteral<"none">;
|
|
255
|
+
}, z.core.$strict>>;
|
|
256
|
+
}, z.core.$strict>;
|
|
257
|
+
policyHash: z.ZodString;
|
|
258
|
+
receiptRefs: z.ZodArray<z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
contentHash: z.ZodString;
|
|
261
|
+
}, z.core.$strict>>;
|
|
262
|
+
includedCount: z.ZodNumber;
|
|
263
|
+
missingRewardCount: z.ZodNumber;
|
|
264
|
+
excludedCount: z.ZodNumber;
|
|
265
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
266
|
+
contentHash: z.ZodString;
|
|
267
|
+
}, z.core.$strict>>;
|
|
224
268
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
225
269
|
}, z.core.$strict>;
|
|
226
270
|
export declare const EvaluationResultSchema: z.ZodObject<{
|
|
@@ -262,6 +306,49 @@ export declare const EvaluationResultSchema: z.ZodObject<{
|
|
|
262
306
|
timeout: "timeout";
|
|
263
307
|
cancelled: "cancelled";
|
|
264
308
|
}>, z.ZodNumber>;
|
|
309
|
+
authoredMetric: z.ZodOptional<z.ZodObject<{
|
|
310
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricResult.v1">;
|
|
311
|
+
runManifest: z.ZodObject<{
|
|
312
|
+
id: z.ZodString;
|
|
313
|
+
contentHash: z.ZodString;
|
|
314
|
+
}, z.core.$strict>;
|
|
315
|
+
tasksetRelease: z.ZodObject<{
|
|
316
|
+
id: z.ZodString;
|
|
317
|
+
contentHash: z.ZodString;
|
|
318
|
+
}, z.core.$strict>;
|
|
319
|
+
policy: z.ZodObject<{
|
|
320
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricPolicy.v1">;
|
|
321
|
+
primaryMetric: z.ZodString;
|
|
322
|
+
aggregation: z.ZodEnum<{
|
|
323
|
+
mean_score: "mean_score";
|
|
324
|
+
pass_rate: "pass_rate";
|
|
325
|
+
weighted_mean: "weighted_mean";
|
|
326
|
+
custom: "custom";
|
|
327
|
+
}>;
|
|
328
|
+
missingReward: z.ZodEnum<{
|
|
329
|
+
zero: "zero";
|
|
330
|
+
exclude: "exclude";
|
|
331
|
+
}>;
|
|
332
|
+
taskWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
333
|
+
customAggregator: z.ZodNullable<z.ZodObject<{
|
|
334
|
+
module: z.ZodString;
|
|
335
|
+
exportName: z.ZodString;
|
|
336
|
+
contentHash: z.ZodString;
|
|
337
|
+
timeoutMs: z.ZodNumber;
|
|
338
|
+
networkPolicy: z.ZodLiteral<"none">;
|
|
339
|
+
}, z.core.$strict>>;
|
|
340
|
+
}, z.core.$strict>;
|
|
341
|
+
policyHash: z.ZodString;
|
|
342
|
+
receiptRefs: z.ZodArray<z.ZodObject<{
|
|
343
|
+
id: z.ZodString;
|
|
344
|
+
contentHash: z.ZodString;
|
|
345
|
+
}, z.core.$strict>>;
|
|
346
|
+
includedCount: z.ZodNumber;
|
|
347
|
+
missingRewardCount: z.ZodNumber;
|
|
348
|
+
excludedCount: z.ZodNumber;
|
|
349
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
350
|
+
contentHash: z.ZodString;
|
|
351
|
+
}, z.core.$strict>>;
|
|
265
352
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
266
353
|
contentHash: z.ZodString;
|
|
267
354
|
}, z.core.$strict>;
|
|
@@ -316,6 +403,7 @@ export declare function aggregateEvaluationReceipts(input: {
|
|
|
316
403
|
manifest: RunManifest;
|
|
317
404
|
receipts: AttemptReceipt[];
|
|
318
405
|
metadata?: Record<string, unknown>;
|
|
406
|
+
authoredMetric?: TasksetMetricResult;
|
|
319
407
|
}): EvaluationResult;
|
|
320
408
|
export declare function createHarnessCompatibilityReceipt(input: z.input<typeof HarnessCompatibilityReceiptContentSchema>): z.infer<typeof HarnessCompatibilityReceiptSchema>;
|
|
321
409
|
export declare function assertComparableRunManifests(base: RunManifest, candidate: RunManifest, compatibility?: z.input<typeof HarnessCompatibilityReceiptSchema>): void;
|
package/dist/types/runs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../../../src/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../../../src/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,OAAO,EAAwD,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEpH,eAAO,MAAM,0BAA0B;;;;;;;;;;kBAK5B,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;kBAKjB,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAW1B,CAAC;AACZ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA+E,CAAC;AAE9G,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkB7B,CAAC;AACZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAkF,CAAC;AAEpH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAe/B,CAAC;AACZ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAoF,CAAC;AAExH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;kBAW1C,CAAC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AAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
|
package/dist/types/tasksets.d.ts
CHANGED
|
@@ -486,6 +486,28 @@ export declare const TasksetReleaseContentSchema: z.ZodObject<{
|
|
|
486
486
|
id: z.ZodString;
|
|
487
487
|
contentHash: z.ZodString;
|
|
488
488
|
}, z.core.$strict>>;
|
|
489
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
490
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricPolicy.v1">;
|
|
491
|
+
primaryMetric: z.ZodString;
|
|
492
|
+
aggregation: z.ZodEnum<{
|
|
493
|
+
mean_score: "mean_score";
|
|
494
|
+
pass_rate: "pass_rate";
|
|
495
|
+
weighted_mean: "weighted_mean";
|
|
496
|
+
custom: "custom";
|
|
497
|
+
}>;
|
|
498
|
+
missingReward: z.ZodEnum<{
|
|
499
|
+
zero: "zero";
|
|
500
|
+
exclude: "exclude";
|
|
501
|
+
}>;
|
|
502
|
+
taskWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
503
|
+
customAggregator: z.ZodNullable<z.ZodObject<{
|
|
504
|
+
module: z.ZodString;
|
|
505
|
+
exportName: z.ZodString;
|
|
506
|
+
contentHash: z.ZodString;
|
|
507
|
+
timeoutMs: z.ZodNumber;
|
|
508
|
+
networkPolicy: z.ZodLiteral<"none">;
|
|
509
|
+
}, z.core.$strict>>;
|
|
510
|
+
}, z.core.$strict>>;
|
|
489
511
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
490
512
|
}, z.core.$strict>;
|
|
491
513
|
export declare const TasksetReleaseSchema: z.ZodObject<{
|
|
@@ -689,6 +711,28 @@ export declare const TasksetReleaseSchema: z.ZodObject<{
|
|
|
689
711
|
id: z.ZodString;
|
|
690
712
|
contentHash: z.ZodString;
|
|
691
713
|
}, z.core.$strict>>;
|
|
714
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
715
|
+
schemaVersion: z.ZodLiteral<"openpond.tasksetMetricPolicy.v1">;
|
|
716
|
+
primaryMetric: z.ZodString;
|
|
717
|
+
aggregation: z.ZodEnum<{
|
|
718
|
+
mean_score: "mean_score";
|
|
719
|
+
pass_rate: "pass_rate";
|
|
720
|
+
weighted_mean: "weighted_mean";
|
|
721
|
+
custom: "custom";
|
|
722
|
+
}>;
|
|
723
|
+
missingReward: z.ZodEnum<{
|
|
724
|
+
zero: "zero";
|
|
725
|
+
exclude: "exclude";
|
|
726
|
+
}>;
|
|
727
|
+
taskWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
728
|
+
customAggregator: z.ZodNullable<z.ZodObject<{
|
|
729
|
+
module: z.ZodString;
|
|
730
|
+
exportName: z.ZodString;
|
|
731
|
+
contentHash: z.ZodString;
|
|
732
|
+
timeoutMs: z.ZodNumber;
|
|
733
|
+
networkPolicy: z.ZodLiteral<"none">;
|
|
734
|
+
}, z.core.$strict>>;
|
|
735
|
+
}, z.core.$strict>>;
|
|
692
736
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
693
737
|
contentHash: z.ZodString;
|
|
694
738
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasksets.d.ts","sourceRoot":"","sources":["../../../../src/tasksets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,uBAAuB,EAOxB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3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CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpond/evals",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Portable Tasksets, graders, evaluation runs, receipts, conformance fixtures, and Work evidence for OpenPond Harnesses",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"LICENSE"
|
|
20
20
|
],
|
|
21
21
|
"exports": {
|
|
22
|
+
"./metrics/node": {
|
|
23
|
+
"types": "./dist/types/metrics-node.d.ts",
|
|
24
|
+
"import": "./dist/metrics-node.js"
|
|
25
|
+
},
|
|
26
|
+
"./metrics": {
|
|
27
|
+
"types": "./dist/types/metrics.d.ts",
|
|
28
|
+
"import": "./dist/metrics.js"
|
|
29
|
+
},
|
|
22
30
|
"./sql-execution/node": {
|
|
23
31
|
"types": "./dist/types/sql-execution-node.d.ts",
|
|
24
32
|
"import": "./dist/sql-execution-node.js"
|