xnn.common.config.loaders.from_argparse#

xnn.common.config.loaders.from_argparse(argv=None)[source]#

Build a Config from command-line arguments.

Parses --config path.yaml plus repeatable --set a.b=c overrides. The config file is loaded via from_yaml(). If no config file is given, defaults are used. Overrides are then applied via apply_overrides().

Parameters:

argv (list[str] or None, optional) – Argument list to parse. If None, sys.argv is used.

Returns:

The populated configuration object.

Return type:

Config