Commit 9db7928
committed
feat(regen): make every registry preset usable on-policy
The regen script previously accepted only presets with a bare-prompt
column (magpie/ultrachat/gsm8k) — a historical artifact of its
Magpie-specific origin, not an architectural limit. Extraction now
mirrors the off-policy ingestion via prepare_row(): filter_fn sees the
raw row, normalize_fn is merged over it with HF map semantics, and
system/user turns are extracted from the result. Every DATASET_CONFIGS
preset is therefore a valid --dataset choice, and any dataset that
works off-policy works on-policy by construction (nemotron's
input/output schema, sharegpt's native conversations, ...).
Resume identity is untouched: _primary_identifier still hashes the raw
row, so --resume stays valid for outputs from earlier runs. For the
three previous presets the extracted turns are unchanged (gsm8k's
normalizer yields the same single user turn its prompt_field fallback
did); prompt_field remains as a per-row fallback for rows whose
conversation is unusable.
Known limits deferred to follow-ups rather than gated: sharegpt4v_coco
needs an image-capable endpoint and local COCO files (same requirement
and failure mode as off-policy), and tool-use datasets get plain-text
regeneration until tool-call regen lands.
Signed-off-by: Ranran Haoran Zhang <ranzhang@redhat.com>1 parent c2b8e8d commit 9db7928
3 files changed
Lines changed: 57 additions & 23 deletions
File tree
- scripts/response_regeneration
- src/speculators/data_generation
- tests/unit/scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
30 | 25 | | |
31 | | - | |
| 26 | + | |
32 | 27 | | |
33 | 28 | | |
34 | 29 | | |
| |||
43 | 38 | | |
44 | 39 | | |
45 | 40 | | |
46 | | - | |
| 41 | + | |
47 | 42 | | |
48 | 43 | | |
49 | 44 | | |
| |||
146 | 141 | | |
147 | 142 | | |
148 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
149 | 157 | | |
150 | 158 | | |
151 | 159 | | |
| |||
412 | 420 | | |
413 | 421 | | |
414 | 422 | | |
415 | | - | |
416 | 423 | | |
417 | 424 | | |
418 | 425 | | |
| |||
431 | 438 | | |
432 | 439 | | |
433 | 440 | | |
434 | | - | |
| 441 | + | |
435 | 442 | | |
436 | 443 | | |
437 | 444 | | |
| |||
488 | 495 | | |
489 | 496 | | |
490 | 497 | | |
491 | | - | |
492 | | - | |
| 498 | + | |
| 499 | + | |
493 | 500 | | |
494 | 501 | | |
495 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
544 | 543 | | |
545 | | - | |
546 | | - | |
547 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
0 commit comments