@hmharness/cli 0.14.20 → 0.14.21
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/dist/main.js +5 -4
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -1129,16 +1129,17 @@ flags:
|
|
|
1129
1129
|
const { writeFile: wf } = await import('node:fs/promises');
|
|
1130
1130
|
// dataset form (J1): deterministic 80/20 split annotated per row,
|
|
1131
1131
|
// leakage audit, and a versioned manifest beside the pairs file
|
|
1132
|
-
const
|
|
1132
|
+
const uniq = E.dedupeDpoPairs(pairs);
|
|
1133
|
+
const split = E.splitDpoPairs(uniq);
|
|
1133
1134
|
const audit = E.auditDpoPairs(split.train, split.eval);
|
|
1134
|
-
const rows =
|
|
1135
|
+
const rows = uniq.map((p) => JSON.stringify({ ...p, split: split.eval.includes(p) ? 'eval' : 'train' }));
|
|
1135
1136
|
await wf(out, rows.join('\n') + (rows.length ? '\n' : ''), 'utf8');
|
|
1136
1137
|
const bySrc = {};
|
|
1137
1138
|
for (const p of pairs)
|
|
1138
1139
|
bySrc[p.source ?? 'unmarked'] = (bySrc[p.source ?? 'unmarked'] || 0) + 1;
|
|
1139
1140
|
const manifest = {
|
|
1140
1141
|
version: 'dpo-' + new Date().toISOString().slice(0, 10).replaceAll('-', '') + '-' + new Date().toISOString().slice(11, 16).replace(':', ''),
|
|
1141
|
-
pairsTotal:
|
|
1142
|
+
pairsTotal: uniq.length,
|
|
1142
1143
|
bySource: bySrc,
|
|
1143
1144
|
train: split.train.length,
|
|
1144
1145
|
eval: split.eval.length,
|
|
@@ -1147,7 +1148,7 @@ flags:
|
|
|
1147
1148
|
};
|
|
1148
1149
|
const mf = join(home, 'evolution', 'dpo-manifest.json');
|
|
1149
1150
|
await wf(mf, JSON.stringify(manifest, null, 2) + '\n', 'utf8');
|
|
1150
|
-
stdout.write('DPO pairs: ' + pairs.length + ' ' + JSON.stringify(bySrc) + ' (train ' + split.train.length + ' / eval ' + split.eval.length + ') -> ' + out + '\n');
|
|
1151
|
+
stdout.write('DPO pairs: ' + uniq.length + ' (raw ' + pairs.length + ', dupes dropped ' + (pairs.length - uniq.length) + ') ' + JSON.stringify(bySrc) + ' (train ' + split.train.length + ' / eval ' + split.eval.length + ') -> ' + out + '\n');
|
|
1151
1152
|
stdout.write('audit: ' + JSON.stringify(audit) + '\n');
|
|
1152
1153
|
if (audit.emptyPrompt || audit.emptyAnswer || audit.duplicatePairs || audit.evalPromptsLeakedIntoTrain)
|
|
1153
1154
|
stdout.write(YELLOW('⚠ audit not clean - fix the flagged rows before training') + '\n');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.21",
|
|
4
4
|
"description": "hmharness command line: one-shot tasks, an interactive REPL, a fullscreen TUI, the web frontend, and direct tool invocation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@hmharness/kernel": "0.9.2",
|
|
47
47
|
"@hmharness/observability": "0.7.0",
|
|
48
|
-
"@hmharness/evolution": "0.14.
|
|
48
|
+
"@hmharness/evolution": "0.14.15",
|
|
49
49
|
"@hmharness/domain-harmony": "0.13.6",
|
|
50
50
|
"@hmharness/domain-ops": "0.8.1",
|
|
51
51
|
"@hmharness/agent": "0.14.11",
|