xnn.common.config.loaders#

Loaders that turn YAML / argparse / Hydra into one Config.

The interchangeability you asked for comes from a single rule: every frontend produces a plain nested dict, and from_dict builds the typed Config from it. Dotted-key overrides (model.cutoff=6.0) are supported uniformly so the same override syntax works on the CLI and with Hydra. Upstream key spellings in the model section (MACE-CLI r_max, NequIP num_layers, …) are rewritten to the xnn canonical names by the translation registry (see translate.py).

Functions

apply_overrides(cfg, overrides)

Apply a.b=c style dotted overrides in place.

from_argparse([argv])

Build a Config from command-line arguments.

from_dict(d)

Build a typed Config from a plain nested dict.

from_hydra(dict_config)

Build a Config from a Hydra / OmegaConf DictConfig.

from_yaml(path)

Load a YAML config file into a Config.