@deepagents/evals 0.33.0 → 0.35.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 +65 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ The package is organized into subpath exports for granular imports:
|
|
|
40
40
|
| `@deepagents/evals/store` | SQLite run persistence |
|
|
41
41
|
| `@deepagents/evals/engine` | Eval engine with concurrency and events |
|
|
42
42
|
| `@deepagents/evals/comparison` | Run diffing and regression detection |
|
|
43
|
-
| `@deepagents/evals/reporters` | Console
|
|
43
|
+
| `@deepagents/evals/reporters` | Console and file reporters |
|
|
44
44
|
|
|
45
45
|
## Dataset
|
|
46
46
|
|
|
@@ -79,6 +79,43 @@ dataset('./large-dataset.jsonl')
|
|
|
79
79
|
| `sample(n)` | Eager — buffers all, picks n random elements |
|
|
80
80
|
| `toArray()` | Consumes into a plain array |
|
|
81
81
|
|
|
82
|
+
### Dataset Utilities
|
|
83
|
+
|
|
84
|
+
The top-level package also exports dataset helpers for Hugging Face ingestion and deterministic record selection:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
import {
|
|
88
|
+
dataset,
|
|
89
|
+
filterRecordsByIndex,
|
|
90
|
+
hf,
|
|
91
|
+
parseRecordSelection,
|
|
92
|
+
pickFromArray,
|
|
93
|
+
} from '@deepagents/evals';
|
|
94
|
+
|
|
95
|
+
const rows = dataset(
|
|
96
|
+
hf({
|
|
97
|
+
dataset: 'openai/gsm8k',
|
|
98
|
+
config: 'main',
|
|
99
|
+
split: 'test',
|
|
100
|
+
rows: 50,
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const { indexes } = parseRecordSelection('1,3-5');
|
|
105
|
+
const sampled = pickFromArray(await rows.toArray(), indexes);
|
|
106
|
+
|
|
107
|
+
for await (const row of filterRecordsByIndex(rows, indexes)) {
|
|
108
|
+
console.log(row);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
| Utility | Description |
|
|
113
|
+
| --------------------------------------- | ---------------------------------------------------------- |
|
|
114
|
+
| `hf(options)` | Stream rows directly from the Hugging Face datasets server |
|
|
115
|
+
| `parseRecordSelection(spec)` | Parse `1,3-5` style selectors into zero-based indexes |
|
|
116
|
+
| `pickFromArray(items, indexes)` | Apply a parsed selection to an in-memory array |
|
|
117
|
+
| `filterRecordsByIndex(source, indexes)` | Apply a parsed selection to an async dataset stream |
|
|
118
|
+
|
|
82
119
|
## Scorers
|
|
83
120
|
|
|
84
121
|
All scorers return `{ score: number (0..1), reason?: string }`.
|
|
@@ -214,6 +251,33 @@ consoleReporter(emitter, {
|
|
|
214
251
|
});
|
|
215
252
|
```
|
|
216
253
|
|
|
254
|
+
## File Reporters
|
|
255
|
+
|
|
256
|
+
Persist run output in machine-readable or shareable formats:
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
import {
|
|
260
|
+
csvReporter,
|
|
261
|
+
htmlReporter,
|
|
262
|
+
jsonReporter,
|
|
263
|
+
markdownReporter,
|
|
264
|
+
} from '@deepagents/evals/reporters';
|
|
265
|
+
|
|
266
|
+
const reporters = [
|
|
267
|
+
jsonReporter({ outputDir: '.evals/reports', pretty: true }),
|
|
268
|
+
csvReporter({ outputDir: '.evals/reports' }),
|
|
269
|
+
markdownReporter({ outputDir: '.evals/reports' }),
|
|
270
|
+
htmlReporter({ outputDir: '.evals/reports' }),
|
|
271
|
+
];
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
| Reporter | Output |
|
|
275
|
+
| -------------------- | ----------------------------------------------------- |
|
|
276
|
+
| `jsonReporter()` | Writes per-case `.jsonl` plus a final summary `.json` |
|
|
277
|
+
| `csvReporter()` | Writes a flat case-by-case CSV file |
|
|
278
|
+
| `markdownReporter()` | Writes a Markdown summary with per-case scores |
|
|
279
|
+
| `htmlReporter()` | Writes a shareable HTML report with summary tables |
|
|
280
|
+
|
|
217
281
|
## License
|
|
218
282
|
|
|
219
283
|
MIT
|