xnn.common.config.loaders.from_dict#

xnn.common.config.loaders.from_dict(d)[source]#

Build a typed Config from a plain nested dict.

This is the funnel every frontend loader passes through. Recognized sections (model, data, optim) are dispatched to their dataclass; the model section first has upstream key spellings translated to the xnn canonical names (translate_model_keys()), then unknown keys inside it are collected into ModelConfig.extra. Known top-level scalars (device, seed, output_dir) are applied directly. Unrecognized keys are ignored.

Parameters:

d (dict[str, Any]) – Nested configuration mapping (as produced by any frontend). A value of None is treated as an empty dict.

Returns:

The populated configuration object.

Return type:

Config