Skip to content

slug_extensions

torch_to_nnef.nemo_tract.slug_extensions

Manually maintained registry of per-slug, per-subnet extensions.

Some NeMo models have implicit dimensionality constraints (e.g., max receptive field of a conv stack) that are not exposed by NeMo but are required by tract for correct pulsification. This registry maps known pretrained model IDs to the extensions that encode those constraints.

Structure::

SLUG_EXTENSIONS = {
    "<pretrained-id>": {
        "<subnet>": ["<extension-string>", ...],
    },
}

get_extensions_for_slug

get_extensions_for_slug(slug: str) -> T.Dict[str, T.List[str]]

Return per-subnet extensions for a known pretrained model slug.

Returns an empty dict when the slug has no registered extensions.