xnn.common.config.translate.translate_model_keys#
- xnn.common.config.translate.translate_model_keys(section)[source]#
Rewrite upstream key spellings in a raw
model:section to xnn names.Looks up the translation table for
section["name"](defaulting to"mace", matchingModelConfig) and returns a flat copy of the section with every foreign key renamed to its canonical spelling. An explicitextra:sub-dict is flattened first so its keys are translated too –from_dictre-splits typed fields fromextraafterwards. When both spellings of the same option are present, the canonical one wins.