Python · 666 bytes Raw Blame History
1 """v2 → v3 migrator: additive `training.cpt` block.
2
3 v3 introduces the continued-pretraining refinements config:
4
5 training:
6 cpt:
7 schedule: auto # auto | dapt | sft
8 embed_warmup_steps: 0
9
10 All fields default so the migrator is pure identity — v2 documents
11 parse as v3 with `cpt = CptConfig()` without any rewrite. The
12 migrator exists only to satisfy the migration-framework coverage
13 contract: every version in `range(1, CURRENT_SCHEMA_VERSION)` must
14 have a registered step, even when that step is a no-op.
15 """
16
17 from __future__ import annotations
18
19
20 def migrate(raw: dict[str, object]) -> dict[str, object]:
21 return dict(raw)