@agentswf/lab 0.3.0 → 0.4.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/package.json +4 -4
- package/schema/{case-check.schema.json → lab-check.schema.json} +1 -1
- package/schema/{case-config.schema.json → lab-config.schema.json} +1 -1
- package/schema/{case-final.schema.json → lab-final.schema.json} +6 -6
- package/schema/{case-grade.schema.json → lab-grade.schema.json} +1 -1
- package/schema/{case-key.schema.json → lab-key.schema.json} +7 -0
- package/schema/{case-label.schema.json → lab-label.schema.json} +3 -3
- package/schema/{case-loop-report.schema.json → lab-loop-report.schema.json} +26 -15
- package/schema/{case-loop.schema.json → lab-loop.schema.json} +1 -1
- package/schema/{case-plan.schema.json → lab-plan.schema.json} +14 -3
- package/schema/{case-proposal.schema.json → lab-proposal.schema.json} +3 -3
- package/schema/{case-report.schema.json → lab-report.schema.json} +272 -36
- package/schema/{case-run.schema.json → lab-run.schema.json} +4 -4
- package/schema/{case-runs.schema.json → lab-runs.schema.json} +8 -1
- package/schema/{case-score.schema.json → lab-score.schema.json} +2 -2
- package/schema/{case-spread.schema.json → lab-spread.schema.json} +6 -6
- package/schema/{case-trial.schema.json → lab-trial.schema.json} +9 -9
- package/schema/{case-try.schema.json → lab-try.schema.json} +6 -6
- package/schema/local.json +3 -3
- package/src/env/capture.ts +1 -1
- package/src/env/compare.ts +7 -7
- package/src/env/fetch.ts +1 -1
- package/src/env/files.ts +14 -14
- package/src/env/grade-helper.ts +15 -15
- package/src/env/grader.ts +5 -2
- package/src/env/index.ts +18 -18
- package/src/env/trial.ts +5 -2
- package/src/format/key.ts +24 -0
- package/src/format/loop.ts +20 -19
- package/src/format/output.ts +120 -59
- package/src/format/records.ts +23 -20
- package/src/format/schema-files.ts +30 -30
- package/src/format/settings.ts +20 -13
- package/src/format/trial-env.ts +9 -6
- package/src/help/awf-lab.txt +1 -1
- package/src/help/case.txt +5 -4
- package/src/help/config.txt +2 -2
- package/src/help/label.txt +2 -2
- package/src/help/loop.txt +10 -10
- package/src/help/report.txt +1 -1
- package/src/help/run.txt +11 -10
- package/src/help/runs.txt +4 -3
- package/src/help/score.txt +4 -3
- package/src/lab/blame.ts +1 -1
- package/src/lab/box.ts +7 -5
- package/src/lab/capture-command.ts +11 -7
- package/src/lab/capture.ts +1 -1
- package/src/lab/check-command.ts +3 -3
- package/src/lab/cli.ts +9 -8
- package/src/lab/columns.ts +5 -5
- package/src/lab/command-context.ts +7 -7
- package/src/lab/compare.ts +8 -8
- package/src/lab/config-command.ts +25 -20
- package/src/lab/dataset.ts +37 -18
- package/src/lab/eval-files.ts +27 -16
- package/src/lab/folders.ts +26 -7
- package/src/lab/good.ts +1 -1
- package/src/lab/grading-stub.txt +2 -2
- package/src/lab/inspect.ts +13 -12
- package/src/lab/labels.ts +16 -11
- package/src/lab/loop-command.ts +68 -64
- package/src/lab/loop-records.ts +5 -5
- package/src/lab/loop.ts +105 -100
- package/src/lab/rates.ts +11 -6
- package/src/lab/record-copies.ts +1 -1
- package/src/lab/report-command.ts +8 -7
- package/src/lab/report.ts +172 -74
- package/src/lab/reuse.ts +29 -21
- package/src/lab/run-command.ts +304 -199
- package/src/lab/run-report.ts +49 -22
- package/src/lab/runs-command.ts +35 -27
- package/src/lab/scaffold.ts +19 -16
- package/src/lab/score-command.ts +72 -64
- package/src/lab/score.ts +1 -1
- package/src/lab/store.ts +3 -3
- package/src/lab/{trial-stub.txt → target-stub.txt} +3 -3
- package/src/lab/trial-settings.ts +17 -12
- package/src/lab/trial.ts +19 -23
- package/src/lab/usage.ts +1 -0
- package/src/lab/workflow-graders.ts +4 -1
- package/src/lab/workspace.ts +16 -9
- package/src/loop/propose.workflow.ts +1 -1
- package/src/shared/compare/index.ts +2 -2
- package/src/shared/compare/paired.ts +20 -20
- package/src/shared/compare/types.ts +4 -4
- package/src/write-schemas.ts +3 -3
- /package/schema/{case-good-record.schema.json → lab-good-record.schema.json} +0 -0
- /package/schema/{case-previous.schema.json → lab-previous.schema.json} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentswf/lab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "agents.wf's lab: run a workflow on cases whose answers are known, grade every trial, compare versions and run the improvement loop. Gives you awf-lab and @agentswf/lab",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://agents.wf/reference/awf-lab",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"LICENSE"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@agentswf/contract": "0.
|
|
35
|
+
"@agentswf/contract": "0.4.0",
|
|
36
36
|
"typebox": "^1.3.34",
|
|
37
37
|
"yaml": "^2.9.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"agentswf": "^0.
|
|
40
|
+
"agentswf": "^0.4.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"agentswf": "0.
|
|
43
|
+
"agentswf": "0.4.0"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "awf-lab loop's final check",
|
|
4
4
|
"type": "object",
|
|
5
|
-
"required": ["kind", "k", "at", "
|
|
5
|
+
"required": ["kind", "k", "at", "kept", "labRun", "decision", "why", "estimate"],
|
|
6
6
|
"properties": {
|
|
7
7
|
"kind": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"const": "awf.
|
|
9
|
+
"const": "awf.lab-final/1"
|
|
10
10
|
},
|
|
11
11
|
"k": {
|
|
12
12
|
"type": "integer",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"type": "string",
|
|
17
17
|
"minLength": 1
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"kept": {
|
|
20
20
|
"type": "integer",
|
|
21
21
|
"minimum": 1
|
|
22
22
|
},
|
|
23
|
-
"
|
|
23
|
+
"labRun": {
|
|
24
24
|
"type": "string",
|
|
25
25
|
"minLength": 1
|
|
26
26
|
},
|
|
27
|
-
"
|
|
27
|
+
"decision": {
|
|
28
28
|
"anyOf": [
|
|
29
29
|
{
|
|
30
30
|
"type": "string",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"type": "string",
|
|
40
40
|
"minLength": 1
|
|
41
41
|
},
|
|
42
|
-
"
|
|
42
|
+
"estimate": {
|
|
43
43
|
"type": "number",
|
|
44
44
|
"minimum": 0
|
|
45
45
|
}
|
|
@@ -85,6 +85,13 @@
|
|
|
85
85
|
"uniqueItems": true,
|
|
86
86
|
"description": "Plain words the report groups cases by, and --tags picks them by; no grader reads them."
|
|
87
87
|
},
|
|
88
|
+
"shared": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"description": "The files and folders of the data folder's shared/ this case gets, relative to it, a folder whole; every one when absent, none when []."
|
|
94
|
+
},
|
|
88
95
|
"captured": {
|
|
89
96
|
"type": "object",
|
|
90
97
|
"required": ["run", "mark"],
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "awf-lab label",
|
|
4
4
|
"type": "object",
|
|
5
|
-
"required": ["kind", "
|
|
5
|
+
"required": ["kind", "trialId", "case", "mark", "at"],
|
|
6
6
|
"properties": {
|
|
7
7
|
"kind": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"const": "awf.
|
|
9
|
+
"const": "awf.lab-label/1"
|
|
10
10
|
},
|
|
11
|
-
"
|
|
11
|
+
"trialId": {
|
|
12
12
|
"type": "string",
|
|
13
13
|
"minLength": 1
|
|
14
14
|
},
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"properties": {
|
|
23
23
|
"kind": {
|
|
24
24
|
"type": "string",
|
|
25
|
-
"const": "awf.
|
|
25
|
+
"const": "awf.lab-loop-report/1"
|
|
26
26
|
},
|
|
27
27
|
"id": {
|
|
28
28
|
"type": "string",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"anyOf": [
|
|
74
74
|
{
|
|
75
75
|
"type": "object",
|
|
76
|
-
"required": ["
|
|
76
|
+
"required": ["labRun", "decision", "unsteady", "estimate"],
|
|
77
77
|
"properties": {
|
|
78
|
-
"
|
|
78
|
+
"labRun": {
|
|
79
79
|
"type": "string",
|
|
80
80
|
"pattern": "^[0-9]{8}-[0-9]{6}-[0-9a-f]{4}$"
|
|
81
81
|
},
|
|
82
|
-
"
|
|
82
|
+
"decision": {
|
|
83
83
|
"anyOf": [
|
|
84
84
|
{
|
|
85
85
|
"type": "string",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"minLength": 1
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
"
|
|
100
|
+
"estimate": {
|
|
101
101
|
"type": "number",
|
|
102
102
|
"minimum": 0
|
|
103
103
|
}
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"type": "array",
|
|
118
118
|
"items": {
|
|
119
119
|
"type": "object",
|
|
120
|
-
"required": ["n", "parent", "
|
|
120
|
+
"required": ["n", "parent", "outcome", "why", "changed", "estimate"],
|
|
121
121
|
"properties": {
|
|
122
122
|
"n": {
|
|
123
123
|
"type": "integer",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"type": "integer",
|
|
128
128
|
"minimum": 0
|
|
129
129
|
},
|
|
130
|
-
"
|
|
130
|
+
"outcome": {
|
|
131
131
|
"type": "string",
|
|
132
132
|
"minLength": 1
|
|
133
133
|
},
|
|
@@ -144,11 +144,22 @@
|
|
|
144
144
|
"minLength": 1
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
|
-
"
|
|
147
|
+
"labRun": {
|
|
148
148
|
"type": "string",
|
|
149
149
|
"pattern": "^[0-9]{8}-[0-9]{6}-[0-9a-f]{4}$"
|
|
150
150
|
},
|
|
151
|
-
"
|
|
151
|
+
"decision": {
|
|
152
|
+
"anyOf": [
|
|
153
|
+
{
|
|
154
|
+
"type": "string",
|
|
155
|
+
"minLength": 1
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "null"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"estimate": {
|
|
152
163
|
"type": "number",
|
|
153
164
|
"minimum": 0
|
|
154
165
|
}
|
|
@@ -164,21 +175,21 @@
|
|
|
164
175
|
"type": "array",
|
|
165
176
|
"items": {
|
|
166
177
|
"type": "object",
|
|
167
|
-
"required": ["k", "
|
|
178
|
+
"required": ["k", "kept", "labRun", "decision", "why", "estimate"],
|
|
168
179
|
"properties": {
|
|
169
180
|
"k": {
|
|
170
181
|
"type": "integer",
|
|
171
182
|
"minimum": 1
|
|
172
183
|
},
|
|
173
|
-
"
|
|
184
|
+
"kept": {
|
|
174
185
|
"type": "integer",
|
|
175
|
-
"minimum":
|
|
186
|
+
"minimum": 1
|
|
176
187
|
},
|
|
177
|
-
"
|
|
188
|
+
"labRun": {
|
|
178
189
|
"type": "string",
|
|
179
190
|
"pattern": "^[0-9]{8}-[0-9]{6}-[0-9a-f]{4}$"
|
|
180
191
|
},
|
|
181
|
-
"
|
|
192
|
+
"decision": {
|
|
182
193
|
"anyOf": [
|
|
183
194
|
{
|
|
184
195
|
"type": "string",
|
|
@@ -192,7 +203,7 @@
|
|
|
192
203
|
"why": {
|
|
193
204
|
"type": "string"
|
|
194
205
|
},
|
|
195
|
-
"
|
|
206
|
+
"estimate": {
|
|
196
207
|
"type": "number",
|
|
197
208
|
"minimum": 0
|
|
198
209
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"kind": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"const": "awf.
|
|
9
|
+
"const": "awf.lab-plan/1"
|
|
10
10
|
},
|
|
11
11
|
"command": {
|
|
12
12
|
"enum": ["run", "score", "loop run", "loop final"]
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"type": "string",
|
|
16
16
|
"minLength": 1
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"labRun": {
|
|
19
19
|
"type": "string",
|
|
20
20
|
"pattern": "^[0-9]{8}-[0-9]{6}-[0-9a-f]{4}$"
|
|
21
21
|
},
|
|
@@ -78,13 +78,24 @@
|
|
|
78
78
|
"minLength": 1
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
"
|
|
81
|
+
"tries": {
|
|
82
82
|
"type": "integer",
|
|
83
83
|
"minimum": 1
|
|
84
84
|
},
|
|
85
85
|
"spread": {
|
|
86
86
|
"type": "boolean"
|
|
87
87
|
},
|
|
88
|
+
"nothing": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"minLength": 1
|
|
91
|
+
},
|
|
92
|
+
"unestimated": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 1
|
|
97
|
+
}
|
|
98
|
+
},
|
|
88
99
|
"estimate": {
|
|
89
100
|
"type": "object",
|
|
90
101
|
"properties": {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "awf-lab loop's proposal.json",
|
|
4
4
|
"type": "object",
|
|
5
|
-
"required": ["kind", "hypothesis", "
|
|
5
|
+
"required": ["kind", "hypothesis", "estimate", "feedback"],
|
|
6
6
|
"properties": {
|
|
7
7
|
"kind": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"const": "awf.
|
|
9
|
+
"const": "awf.lab-proposal/1"
|
|
10
10
|
},
|
|
11
11
|
"hypothesis": {
|
|
12
12
|
"type": "object",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"additionalProperties": false
|
|
37
37
|
},
|
|
38
|
-
"
|
|
38
|
+
"estimate": {
|
|
39
39
|
"type": "number",
|
|
40
40
|
"minimum": 0
|
|
41
41
|
},
|