Python · 569 bytes Raw Blame History
1 """v7 → v8 migrator: additive `training.gate` block.
2
3 v8 introduces the learned MoE adapter gate (`TrainingConfig.gate`) for
4 per-prompt routing over `training.adapters`. All fields have defaults
5 that preserve v7 behavior exactly — `gate.enabled=False` means the
6 trainer runs identically to v7 and the inference path uses static
7 weights as before.
8
9 A v7 document without `training.gate` parses as v8 unchanged; this is
10 a pure identity migrator.
11 """
12
13 from __future__ import annotations
14
15
16 def migrate(raw: dict[str, object]) -> dict[str, object]:
17 return dict(raw)