@openpond/evals 0.10.6 → 0.10.8

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.
Files changed (49) hide show
  1. package/LEARNING.md +18 -0
  2. package/dist/learning/authoring-service.js +11 -1
  3. package/dist/learning/authoring.js +1 -0
  4. package/dist/learning/contracts.js +36 -1
  5. package/dist/learning/index.js +2 -0
  6. package/dist/learning/iteration-candidate-decision.js +12 -7
  7. package/dist/learning/iteration-reservation-contracts.js +2 -1
  8. package/dist/learning/iteration-reservation-service.js +5 -1
  9. package/dist/learning/iteration-training-parent.js +47 -0
  10. package/dist/learning/policy-inspection.js +15 -3
  11. package/dist/learning/rating-reward-fixture.js +19 -0
  12. package/dist/learning/service.js +7 -2
  13. package/dist/learning/transport.js +1 -1
  14. package/dist/types/learning/authoring-service.d.ts +11 -0
  15. package/dist/types/learning/authoring-service.d.ts.map +1 -1
  16. package/dist/types/learning/authoring.d.ts +55 -0
  17. package/dist/types/learning/authoring.d.ts.map +1 -1
  18. package/dist/types/learning/contracts.d.ts +75 -0
  19. package/dist/types/learning/contracts.d.ts.map +1 -1
  20. package/dist/types/learning/index.d.ts +2 -0
  21. package/dist/types/learning/index.d.ts.map +1 -1
  22. package/dist/types/learning/iteration-candidate-decision.d.ts +16 -0
  23. package/dist/types/learning/iteration-candidate-decision.d.ts.map +1 -1
  24. package/dist/types/learning/iteration-reservation-contracts.d.ts +14 -0
  25. package/dist/types/learning/iteration-reservation-contracts.d.ts.map +1 -1
  26. package/dist/types/learning/iteration-reservation-service.d.ts.map +1 -1
  27. package/dist/types/learning/iteration-training-parent.d.ts +37 -0
  28. package/dist/types/learning/iteration-training-parent.d.ts.map +1 -0
  29. package/dist/types/learning/operations.d.ts +22 -0
  30. package/dist/types/learning/operations.d.ts.map +1 -1
  31. package/dist/types/learning/policy-inspection.d.ts +34 -0
  32. package/dist/types/learning/policy-inspection.d.ts.map +1 -1
  33. package/dist/types/learning/rating-reward-fixture.d.ts +8 -0
  34. package/dist/types/learning/rating-reward-fixture.d.ts.map +1 -0
  35. package/dist/types/learning/repository.d.ts +50 -0
  36. package/dist/types/learning/repository.d.ts.map +1 -1
  37. package/dist/types/learning/service.d.ts +34 -0
  38. package/dist/types/learning/service.d.ts.map +1 -1
  39. package/dist/types/learning/transport.d.ts +64 -0
  40. package/dist/types/learning/transport.d.ts.map +1 -1
  41. package/package.json +1 -1
  42. package/schemas/learning/v1/chain.schema.json +75 -2
  43. package/schemas/learning/v1/command-request.schema.json +63 -20
  44. package/schemas/learning/v1/draft.schema.json +31 -0
  45. package/schemas/learning/v1/feedback-submission.schema.json +55 -37
  46. package/schemas/learning/v1/feedback.schema.json +94 -38
  47. package/schemas/learning/v1/iteration.schema.json +47 -0
  48. package/schemas/learning/v1/policy-inspection.schema.json +127 -33
  49. package/schemas/learning/v1/read-request.schema.json +7 -0
@@ -13,8 +13,7 @@
13
13
  "type": "object",
14
14
  "properties": {
15
15
  "schemaVersion": {
16
- "type": "string",
17
- "const": "openpond.taskFeedback.v1"
16
+ "$ref": "#/$defs/__schema1"
18
17
  },
19
18
  "sourceId": {
20
19
  "$ref": "#/$defs/__schema0"
@@ -29,40 +28,19 @@
29
28
  "$ref": "#/$defs/__schema0"
30
29
  },
31
30
  "expectedEvidenceHash": {
32
- "anyOf": [
33
- {
34
- "$ref": "#/$defs/__schema1"
35
- },
36
- {
37
- "type": "null"
38
- }
39
- ]
31
+ "$ref": "#/$defs/__schema2"
40
32
  },
41
33
  "occurredAt": {
42
- "$ref": "#/$defs/__schema2"
34
+ "$ref": "#/$defs/__schema4"
43
35
  },
44
36
  "kind": {
45
- "type": "string",
46
- "enum": [
47
- "outcome",
48
- "target_correction",
49
- "ground_truth_correction",
50
- "input_correction",
51
- "family_resolution"
52
- ]
37
+ "$ref": "#/$defs/__schema5"
53
38
  },
54
39
  "value": {
55
- "type": "object",
56
- "propertyNames": {
57
- "type": "string"
58
- },
59
- "additionalProperties": {
60
- "$ref": "#/$defs/__schema3"
61
- }
40
+ "$ref": "#/$defs/__schema6"
62
41
  },
63
42
  "note": {
64
- "type": "string",
65
- "maxLength": 20000
43
+ "$ref": "#/$defs/__schema8"
66
44
  }
67
45
  },
68
46
  "required": [
@@ -92,7 +70,7 @@
92
70
  "evidence": {
93
71
  "anyOf": [
94
72
  {
95
- "$ref": "#/$defs/__schema4"
73
+ "$ref": "#/$defs/__schema9"
96
74
  },
97
75
  {
98
76
  "type": "null"
@@ -100,13 +78,53 @@
100
78
  ]
101
79
  },
102
80
  "createdAt": {
103
- "$ref": "#/$defs/__schema2"
81
+ "$ref": "#/$defs/__schema4"
104
82
  },
105
83
  "revision": {
106
84
  "type": "integer",
107
85
  "exclusiveMinimum": 0,
108
86
  "maximum": 9007199254740991
109
87
  },
88
+ "submittedBy": {
89
+ "default": null,
90
+ "anyOf": [
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "id": {
95
+ "$ref": "#/$defs/__schema0"
96
+ },
97
+ "role": {
98
+ "type": "string",
99
+ "enum": [
100
+ "editor",
101
+ "reviewer",
102
+ "source"
103
+ ]
104
+ },
105
+ "sourceId": {
106
+ "anyOf": [
107
+ {
108
+ "$ref": "#/$defs/__schema0"
109
+ },
110
+ {
111
+ "type": "null"
112
+ }
113
+ ]
114
+ }
115
+ },
116
+ "required": [
117
+ "id",
118
+ "role",
119
+ "sourceId"
120
+ ],
121
+ "additionalProperties": false
122
+ },
123
+ {
124
+ "type": "null"
125
+ }
126
+ ]
127
+ },
110
128
  "review": {
111
129
  "default": null,
112
130
  "anyOf": [
@@ -119,7 +137,7 @@
119
137
  "decision": {
120
138
  "anyOf": [
121
139
  {
122
- "$ref": "#/$defs/__schema4"
140
+ "$ref": "#/$defs/__schema9"
123
141
  },
124
142
  {
125
143
  "type": "null"
@@ -131,7 +149,7 @@
131
149
  "maxLength": 20000
132
150
  },
133
151
  "resolvedAt": {
134
- "$ref": "#/$defs/__schema2"
152
+ "$ref": "#/$defs/__schema4"
135
153
  }
136
154
  },
137
155
  "required": [
@@ -156,6 +174,7 @@
156
174
  "evidence",
157
175
  "createdAt",
158
176
  "revision",
177
+ "submittedBy",
159
178
  "review"
160
179
  ],
161
180
  "additionalProperties": false,
@@ -167,14 +186,47 @@
167
186
  },
168
187
  "__schema1": {
169
188
  "type": "string",
170
- "pattern": "^[a-f0-9]{64}$"
189
+ "const": "openpond.taskFeedback.v1"
171
190
  },
172
191
  "__schema2": {
192
+ "anyOf": [
193
+ {
194
+ "$ref": "#/$defs/__schema3"
195
+ },
196
+ {
197
+ "type": "null"
198
+ }
199
+ ]
200
+ },
201
+ "__schema3": {
202
+ "type": "string",
203
+ "pattern": "^[a-f0-9]{64}$"
204
+ },
205
+ "__schema4": {
173
206
  "type": "string",
174
207
  "format": "date-time",
175
208
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
176
209
  },
177
- "__schema3": {
210
+ "__schema5": {
211
+ "type": "string",
212
+ "enum": [
213
+ "outcome",
214
+ "target_correction",
215
+ "ground_truth_correction",
216
+ "input_correction",
217
+ "family_resolution"
218
+ ]
219
+ },
220
+ "__schema6": {
221
+ "type": "object",
222
+ "propertyNames": {
223
+ "type": "string"
224
+ },
225
+ "additionalProperties": {
226
+ "$ref": "#/$defs/__schema7"
227
+ }
228
+ },
229
+ "__schema7": {
178
230
  "anyOf": [
179
231
  {
180
232
  "type": "string"
@@ -191,7 +243,7 @@
191
243
  {
192
244
  "type": "array",
193
245
  "items": {
194
- "$ref": "#/$defs/__schema3"
246
+ "$ref": "#/$defs/__schema7"
195
247
  }
196
248
  },
197
249
  {
@@ -200,19 +252,23 @@
200
252
  "type": "string"
201
253
  },
202
254
  "additionalProperties": {
203
- "$ref": "#/$defs/__schema3"
255
+ "$ref": "#/$defs/__schema7"
204
256
  }
205
257
  }
206
258
  ]
207
259
  },
208
- "__schema4": {
260
+ "__schema8": {
261
+ "type": "string",
262
+ "maxLength": 20000
263
+ },
264
+ "__schema9": {
209
265
  "type": "object",
210
266
  "properties": {
211
267
  "id": {
212
268
  "$ref": "#/$defs/__schema0"
213
269
  },
214
270
  "contentHash": {
215
- "$ref": "#/$defs/__schema1"
271
+ "$ref": "#/$defs/__schema3"
216
272
  },
217
273
  "revision": {
218
274
  "type": "integer",
@@ -63,6 +63,43 @@
63
63
  "trainingParent": {
64
64
  "$ref": "#/$defs/__schema3"
65
65
  },
66
+ "trainingParentSelection": {
67
+ "anyOf": [
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "iterationId": {
72
+ "$ref": "#/$defs/__schema0"
73
+ },
74
+ "iterationRevision": {
75
+ "type": "integer",
76
+ "exclusiveMinimum": 0,
77
+ "maximum": 9007199254740991
78
+ },
79
+ "candidate": {
80
+ "$ref": "#/$defs/__schema3"
81
+ },
82
+ "decision": {
83
+ "$ref": "#/$defs/__schema1"
84
+ },
85
+ "decidedAt": {
86
+ "$ref": "#/$defs/__schema4"
87
+ }
88
+ },
89
+ "required": [
90
+ "iterationId",
91
+ "iterationRevision",
92
+ "candidate",
93
+ "decision",
94
+ "decidedAt"
95
+ ],
96
+ "additionalProperties": false
97
+ },
98
+ {
99
+ "type": "null"
100
+ }
101
+ ]
102
+ },
66
103
  "teacher": {
67
104
  "anyOf": [
68
105
  {
@@ -124,6 +161,16 @@
124
161
  }
125
162
  ]
126
163
  },
164
+ "candidateDecisionAt": {
165
+ "anyOf": [
166
+ {
167
+ "$ref": "#/$defs/__schema4"
168
+ },
169
+ {
170
+ "type": "null"
171
+ }
172
+ ]
173
+ },
127
174
  "dispatchId": {
128
175
  "$ref": "#/$defs/__schema0"
129
176
  },
@@ -3,33 +3,13 @@
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "policy": {
6
- "type": "object",
7
- "properties": {
8
- "id": {
9
- "$ref": "#/$defs/__schema0"
10
- },
11
- "contentHash": {
12
- "type": "string",
13
- "pattern": "^[a-f0-9]{64}$"
14
- },
15
- "revision": {
16
- "type": "integer",
17
- "exclusiveMinimum": 0,
18
- "maximum": 9007199254740991
19
- }
20
- },
21
- "required": [
22
- "id",
23
- "contentHash",
24
- "revision"
25
- ],
26
- "additionalProperties": false
6
+ "$ref": "#/$defs/__schema0"
27
7
  },
28
8
  "modelProjectId": {
29
- "$ref": "#/$defs/__schema0"
9
+ "$ref": "#/$defs/__schema1"
30
10
  },
31
11
  "inspectedAt": {
32
- "$ref": "#/$defs/__schema1"
12
+ "$ref": "#/$defs/__schema3"
33
13
  },
34
14
  "chain": {
35
15
  "anyOf": [
@@ -41,7 +21,7 @@
41
21
  "const": "openpond.learningChain.v1"
42
22
  },
43
23
  "id": {
44
- "$ref": "#/$defs/__schema0"
24
+ "$ref": "#/$defs/__schema1"
45
25
  },
46
26
  "revision": {
47
27
  "type": "integer",
@@ -49,12 +29,22 @@
49
29
  "maximum": 9007199254740991
50
30
  },
51
31
  "modelProjectId": {
52
- "$ref": "#/$defs/__schema0"
32
+ "$ref": "#/$defs/__schema1"
53
33
  },
54
34
  "activeIterationId": {
55
35
  "anyOf": [
56
36
  {
57
- "$ref": "#/$defs/__schema0"
37
+ "$ref": "#/$defs/__schema1"
38
+ },
39
+ {
40
+ "type": "null"
41
+ }
42
+ ]
43
+ },
44
+ "acceptedParent": {
45
+ "anyOf": [
46
+ {
47
+ "$ref": "#/$defs/__schema4"
58
48
  },
59
49
  {
60
50
  "type": "null"
@@ -62,12 +52,12 @@
62
52
  ]
63
53
  },
64
54
  "latestIterationId": {
65
- "$ref": "#/$defs/__schema0"
55
+ "$ref": "#/$defs/__schema1"
66
56
  },
67
57
  "lastReservedAt": {
68
58
  "anyOf": [
69
59
  {
70
- "$ref": "#/$defs/__schema1"
60
+ "$ref": "#/$defs/__schema3"
71
61
  },
72
62
  {
73
63
  "type": "null"
@@ -75,7 +65,7 @@
75
65
  ]
76
66
  },
77
67
  "updatedAt": {
78
- "$ref": "#/$defs/__schema1"
68
+ "$ref": "#/$defs/__schema3"
79
69
  }
80
70
  },
81
71
  "required": [
@@ -95,6 +85,37 @@
95
85
  }
96
86
  ]
97
87
  },
88
+ "trainingParent": {
89
+ "default": null,
90
+ "anyOf": [
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "reference": {
95
+ "$ref": "#/$defs/__schema5"
96
+ },
97
+ "selection": {
98
+ "anyOf": [
99
+ {
100
+ "$ref": "#/$defs/__schema4"
101
+ },
102
+ {
103
+ "type": "null"
104
+ }
105
+ ]
106
+ }
107
+ },
108
+ "required": [
109
+ "reference",
110
+ "selection"
111
+ ],
112
+ "additionalProperties": false
113
+ },
114
+ {
115
+ "type": "null"
116
+ }
117
+ ]
118
+ },
98
119
  "counts": {
99
120
  "anyOf": [
100
121
  {
@@ -146,13 +167,13 @@
146
167
  "maxItems": 20,
147
168
  "type": "array",
148
169
  "items": {
149
- "$ref": "#/$defs/__schema2"
170
+ "$ref": "#/$defs/__schema6"
150
171
  }
151
172
  },
152
173
  "cooldownUntil": {
153
174
  "anyOf": [
154
175
  {
155
- "$ref": "#/$defs/__schema1"
176
+ "$ref": "#/$defs/__schema3"
156
177
  },
157
178
  {
158
179
  "type": "null"
@@ -198,6 +219,7 @@
198
219
  "modelProjectId",
199
220
  "inspectedAt",
200
221
  "chain",
222
+ "trainingParent",
201
223
  "counts",
202
224
  "minimumApprovedExamples",
203
225
  "canReserve",
@@ -208,16 +230,88 @@
208
230
  "additionalProperties": false,
209
231
  "$defs": {
210
232
  "__schema0": {
233
+ "type": "object",
234
+ "properties": {
235
+ "id": {
236
+ "$ref": "#/$defs/__schema1"
237
+ },
238
+ "contentHash": {
239
+ "$ref": "#/$defs/__schema2"
240
+ },
241
+ "revision": {
242
+ "type": "integer",
243
+ "exclusiveMinimum": 0,
244
+ "maximum": 9007199254740991
245
+ }
246
+ },
247
+ "required": [
248
+ "id",
249
+ "contentHash",
250
+ "revision"
251
+ ],
252
+ "additionalProperties": false
253
+ },
254
+ "__schema1": {
211
255
  "type": "string",
212
256
  "minLength": 1,
213
257
  "maxLength": 240
214
258
  },
215
- "__schema1": {
259
+ "__schema2": {
260
+ "type": "string",
261
+ "pattern": "^[a-f0-9]{64}$"
262
+ },
263
+ "__schema3": {
216
264
  "type": "string",
217
265
  "format": "date-time",
218
266
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
219
267
  },
220
- "__schema2": {
268
+ "__schema4": {
269
+ "type": "object",
270
+ "properties": {
271
+ "iterationId": {
272
+ "$ref": "#/$defs/__schema1"
273
+ },
274
+ "iterationRevision": {
275
+ "type": "integer",
276
+ "exclusiveMinimum": 0,
277
+ "maximum": 9007199254740991
278
+ },
279
+ "candidate": {
280
+ "$ref": "#/$defs/__schema5"
281
+ },
282
+ "decision": {
283
+ "$ref": "#/$defs/__schema0"
284
+ },
285
+ "decidedAt": {
286
+ "$ref": "#/$defs/__schema3"
287
+ }
288
+ },
289
+ "required": [
290
+ "iterationId",
291
+ "iterationRevision",
292
+ "candidate",
293
+ "decision",
294
+ "decidedAt"
295
+ ],
296
+ "additionalProperties": false
297
+ },
298
+ "__schema5": {
299
+ "type": "object",
300
+ "properties": {
301
+ "id": {
302
+ "$ref": "#/$defs/__schema1"
303
+ },
304
+ "contentHash": {
305
+ "$ref": "#/$defs/__schema2"
306
+ }
307
+ },
308
+ "required": [
309
+ "id",
310
+ "contentHash"
311
+ ],
312
+ "additionalProperties": false
313
+ },
314
+ "__schema6": {
221
315
  "type": "object",
222
316
  "properties": {
223
317
  "code": {
@@ -94,6 +94,13 @@
94
94
  "minLength": 1,
95
95
  "maxLength": 200
96
96
  },
97
+ "reviewState": {
98
+ "type": "string",
99
+ "enum": [
100
+ "inbox",
101
+ "reviewed"
102
+ ]
103
+ },
97
104
  "afterId": {
98
105
  "$ref": "#/$defs/__schema0"
99
106
  },