@hmharness/cli 0.14.18 → 0.14.19

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 (2) hide show
  1. package/dist/main.js +22 -2
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -1121,11 +1121,31 @@ flags:
1121
1121
  const pairs = E.exportDpoPairs(merged, insights, (x2) => tasks.get(x2) ?? '', (x2) => answers.get(x2) ?? '', { sources });
1122
1122
  const out = join(home, 'evolution', 'dpo-pairs.jsonl');
1123
1123
  const { writeFile: wf } = await import('node:fs/promises');
1124
- await wf(out, pairs.map((p) => JSON.stringify(p)).join('\n') + (pairs.length ? '\n' : ''), 'utf8');
1124
+ // dataset form (J1): deterministic 80/20 split annotated per row,
1125
+ // leakage audit, and a versioned manifest beside the pairs file
1126
+ const split = E.splitDpoPairs(pairs);
1127
+ const audit = E.auditDpoPairs(split.train, split.eval);
1128
+ const rows = pairs.map((p) => JSON.stringify({ ...p, split: split.eval.includes(p) ? 'eval' : 'train' }));
1129
+ await wf(out, rows.join('\n') + (rows.length ? '\n' : ''), 'utf8');
1125
1130
  const bySrc = {};
1126
1131
  for (const p of pairs)
1127
1132
  bySrc[p.source ?? 'unmarked'] = (bySrc[p.source ?? 'unmarked'] || 0) + 1;
1128
- stdout.write('DPO pairs: ' + pairs.length + ' ' + JSON.stringify(bySrc) + ' -> ' + out + '\n');
1133
+ const manifest = {
1134
+ version: 'dpo-' + new Date().toISOString().slice(0, 10).replaceAll('-', '') + '-' + new Date().toISOString().slice(11, 16).replace(':', ''),
1135
+ pairsTotal: pairs.length,
1136
+ bySource: bySrc,
1137
+ train: split.train.length,
1138
+ eval: split.eval.length,
1139
+ audit,
1140
+ exportedAt: new Date().toISOString(),
1141
+ };
1142
+ const mf = join(home, 'evolution', 'dpo-manifest.json');
1143
+ await wf(mf, JSON.stringify(manifest, null, 2) + '\n', 'utf8');
1144
+ stdout.write('DPO pairs: ' + pairs.length + ' ' + JSON.stringify(bySrc) + ' (train ' + split.train.length + ' / eval ' + split.eval.length + ') -> ' + out + '\n');
1145
+ stdout.write('audit: ' + JSON.stringify(audit) + '\n');
1146
+ if (audit.emptyPrompt || audit.emptyAnswer || audit.duplicatePairs || audit.evalPromptsLeakedIntoTrain)
1147
+ stdout.write(YELLOW('⚠ audit not clean - fix the flagged rows before training') + '\n');
1148
+ stdout.write('manifest: ' + mf + '\n');
1129
1149
  return;
1130
1150
  }
1131
1151
  stdout.write('usage: hmh reward fit | report | export-dpo\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/cli",
3
- "version": "0.14.18",
3
+ "version": "0.14.19",
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.12",
48
+ "@hmharness/evolution": "0.14.13",
49
49
  "@hmharness/domain-harmony": "0.13.5",
50
50
  "@hmharness/domain-ops": "0.8.1",
51
51
  "@hmharness/agent": "0.14.11",