Skip to content

Commit ded3d62

Browse files
committed
Keep mismatch examples out of code and docs
Leave concrete catalog/loader mismatch cases in the PR description; keep in-repo sync tooling and maintainer docs generic aside from required config maps.
1 parent 11bcc89 commit ded3d62

3 files changed

Lines changed: 28 additions & 59 deletions

File tree

docs/maintainers/loader_and_catalog.md

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,10 @@ For every **installable, standalone** `ModelPackage`:
2424
Dependency / subcomponent packages (`standalone=False`, with
2525
`parent_package_id`) do **not** need their own loader.
2626

27-
Bundled loaders without a downloadable package (today: `silero_vad`) are allowed.
28-
If you add another, list it in `BUNDLED_LOADERS_WITHOUT_PACKAGE` inside
27+
Registered loaders that ship as bundled assets (no downloadable package) are
28+
allowed. List them in `BUNDLED_LOADERS_WITHOUT_PACKAGE` inside
2929
`tools/check_loader_catalog_sync.py`.
3030

31-
## Verified parked families (this release tree)
32-
33-
These registry stubs are **commented out**, and the loader sources are **not
34-
present** under `src/models/` / `include/engine/models/` (or community paths):
35-
36-
| Registry stub | Catalog package(s) | Notes |
37-
|---|---|---|
38-
| `kokoro_tts` | `kokoro_82m_bf16` | Warm-bench tests remain; no loader sources |
39-
| `higgs_tts` | `higgs_audio_v3_tts_4b` (`family=higgs_audio_tts`) | Name mismatch: pick one id when re-enabling |
40-
| `parakeet_tdt` | `parakeet_tdt_0_6b_v3` | Warm-bench / docs may remain |
41-
42-
Matching catalog entries must use `UnsupportedSource` until the loader code is
43-
actually merged and registered.
44-
4531
If a loader is not ready for this release tree:
4632

4733
1. Keep it **commented out** in `src/framework/runtime/registry.cpp`, and
@@ -51,6 +37,9 @@ If a loader is not ready for this release tree:
5137

5238
Do **not** leave a live `SnapshotSource` for a commented-out loader.
5339

40+
Optional catalog↔registry family renames for parked stubs go in
41+
`PARKED_FAMILY_ALIASES` in the sync check (collapse to one id when re-enabling).
42+
5443
## Checklist: adding a model family
5544

5645
1. Implement `include/engine/models/<family>/` (or `community_models/`) with a
@@ -62,8 +51,7 @@ Do **not** leave a live `SnapshotSource` for a commented-out loader.
6251
3. Add `model_specs/<family>.json` when the family needs package-spec discovery.
6352
4. Add one or more `ModelPackage` entries in `tools/model_manager.py`:
6453
- Set `family="<family>"` explicitly when the package id does not strip cleanly
65-
to the loader id (examples: `kokoro_82m_bf16``kokoro_tts`,
66-
`vietneu_tts_v3_turbo``vietneu_tts`).
54+
to the loader id.
6755
- Set `tasks=(...)` when defaults would be ambiguous.
6856
- Use `standalone=False` + `parent_package_id` for tokenizers / subcomponents.
6957
5. Update README supported-model / package tables.
@@ -99,9 +87,8 @@ Pick **one** family string and use it everywhere:
9987
- `ModelPackage.family`
10088
- README “Supported Models” family column
10189

102-
Avoid mismatches such as catalog `higgs_audio_tts` with a registry stub named
103-
`higgs_tts`. Integrators match on the string; aliases are not implied (the sync
104-
check only knows the small parked alias map for currently parked stubs).
90+
Integrators match on the string; aliases are not implied unless listed in
91+
`PARKED_FAMILY_ALIASES` for currently parked stubs.
10592

10693
## CI
10794

tools/check_loader_catalog_sync.py

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
#!/usr/bin/env python3
22
"""Fail when installable catalog packages reference unregistered loaders.
33
4-
The machine-readable contract from PR #74 makes package ``family`` and
5-
``audiocpp_cli --list-loaders`` authoritative for integrators. Catalog entries
6-
must not advertise installable packages for families that are commented out or
7-
missing from ``src/framework/runtime/registry.cpp``.
8-
9-
Verified release-tree facts this check encodes:
10-
11-
- Parked registry stubs currently include ``kokoro_tts``, ``higgs_tts``, and
12-
``parakeet_tdt``. Those loader *sources are not in this tree* (no
13-
``src/models/<family>`` / matching include); only comments + warm-bench tests
14-
remain. Matching catalog packages must be ``UnsupportedSource``.
15-
- ``higgs_audio_tts`` is treated as an alias of the parked ``higgs_tts`` stub
16-
until one family id is chosen when the loader returns.
17-
- ``silero_vad`` is a registered loader without a model_manager package (bundled
18-
asset path). That is allowed; see docs/maintainers/loader_and_catalog.md.
4+
``model_manager list --json`` family fields and ``audiocpp_cli --list-loaders``
5+
must stay aligned. Installable standalone packages cannot advertise a family
6+
that is missing or commented out in ``src/framework/runtime/registry.cpp``.
197
208
See docs/maintainers/loader_and_catalog.md.
219
"""
@@ -35,8 +23,7 @@
3523

3624
_LOADER_CALL_RE = re.compile(r"\bmake_([a-z0-9_]+)_loader\s*\(\s*\)")
3725

38-
# Catalog family strings that refer to a differently named parked registry stub.
39-
# When re-enabling a loader, collapse these to one id everywhere.
26+
# Optional: catalog family strings that map to a differently named parked stub.
4027
PARKED_FAMILY_ALIASES: dict[str, set[str]] = {
4128
"higgs_tts": {"higgs_audio_tts"},
4229
}
@@ -161,7 +148,6 @@ def check_catalog(
161148
)
162149

163150
if explicit is None and inferred not in active and family in active:
164-
# Should be unreachable if family comes from inference, but keep tight.
165151
errors.append(
166152
f"{package_id}: set ModelPackage.family explicitly "
167153
f"(id inference '{inferred}' is not a registered loader)"
@@ -173,7 +159,6 @@ def check_catalog(
173159
f"is not registered in registry.cpp{parked_hint(family, commented)}"
174160
)
175161
elif family_is_parked(family, commented):
176-
# Active and commented with same name should not happen; still guard.
177162
errors.append(
178163
f"{package_id}: family '{family}' is both active and commented in registry.cpp"
179164
)
@@ -250,37 +235,40 @@ def check_readme(
250235
class _SyncCheckSelfTests(unittest.TestCase):
251236
def test_parse_active_and_commented(self) -> None:
252237
text = """
253-
// make_kokoro_tts_loader(),
254-
make_pocket_tts_loader(),
255-
make_higgs_tts_loader(), // trailing comment still active
238+
// make_family_a_loader(),
239+
make_family_b_loader(),
240+
make_family_c_loader(), // trailing comment still active
256241
"""
257242
active, commented = parse_registry_loaders(text)
258-
self.assertEqual(active, {"pocket_tts", "higgs_tts"})
259-
self.assertEqual(commented, {"kokoro_tts"})
243+
self.assertEqual(active, {"family_b", "family_c"})
244+
self.assertEqual(commented, {"family_a"})
260245

261246
def test_parked_alias_blocks_installable(self) -> None:
262247
class Pkg:
263248
def __init__(self, family=None):
264249
self.family = family
265250

251+
stub = next(iter(PARKED_FAMILY_ALIASES))
252+
alias = next(iter(PARKED_FAMILY_ALIASES[stub]))
253+
266254
def payload(package):
267255
return {
268-
"id": "higgs_audio_v3_tts_4b",
269-
"family": "higgs_audio_tts",
256+
"id": "pkg_alias",
257+
"family": alias,
270258
"installable": True,
271259
"standalone": True,
272260
"source": {"kind": "huggingface_snapshot"},
273261
}
274262

275263
errors, _ = check_catalog(
276-
active={"pocket_tts"},
277-
commented={"higgs_tts"},
278-
packages=[Pkg(family="higgs_audio_tts")],
264+
active={"family_b"},
265+
commented={stub},
266+
packages=[Pkg(family=alias)],
279267
package_payload=payload,
280-
default_family_from_package_id=lambda _pid: "higgs_audio_v3_tts",
268+
default_family_from_package_id=lambda _pid: "pkg_alias",
281269
)
282-
self.assertTrue(any("higgs_audio_tts" in e for e in errors))
283-
self.assertTrue(any("parked loader 'higgs_tts'" in e for e in errors))
270+
self.assertTrue(any(alias in e for e in errors))
271+
self.assertTrue(any(f"parked loader '{stub}'" in e for e in errors))
284272

285273

286274
def main() -> int:

tools/model_manager.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@ def package_usage_examples(package: ModelPackage) -> list[str]:
220220
id="kokoro_82m_bf16",
221221
display_name="Kokoro 82M bf16",
222222
target_directory="Kokoro-82M-bf16",
223-
# Loader is not registered in this release tree (see registry.cpp and
224-
# docs/maintainers/loader_and_catalog.md). Keep the id for docs/history
225-
# but do not advertise an installable HF snapshot.
226223
source=UnsupportedSource(
227224
reason=(
228225
"kokoro_tts loader is not registered in this release tree yet "
@@ -849,9 +846,6 @@ def package_usage_examples(package: ModelPackage) -> list[str]:
849846
id="higgs_audio_v3_tts_4b",
850847
display_name="Higgs Audio v3 TTS 4B",
851848
target_directory="higgs-audio-v3-tts-4b",
852-
# Catalog family must match the registered loader family id. The parked
853-
# registry stub currently uses higgs_tts; when re-enabling, pick one
854-
# family string and use it in registry, model_specs, and this field.
855849
source=UnsupportedSource(
856850
reason=(
857851
"higgs_tts / higgs_audio_tts loader is not registered in this "

0 commit comments

Comments
 (0)