Registers the plugins for the given configuration.
check_remote_config
cli.config.check_remote_config(config)
First, determines if the passed config is a valid HTTPS URL. Then, attempts to query
for it and parse its content, first as JSON, then as YAML (YAML is preferred).
Finally, the parsed content is written to a local file and its path is returned.
Parameters
Name
Type
Description
Default
config
Union[str, Path]
HTTPS URL to a YAML or JSON file.
required
Returns
Name
Type
Description
Union[str, Path]
Either the original config if it’s not a valid HTTPS URL, or the path to the
Union[str, Path]
downloaded remote config.
Raises
Name
Type
Description
ValueError
If the remote configuration is neither valid JSON or YAML.
RuntimeError
If some request-related exception occurs from the file download.
Exception
Catch-all for any other exception.
choose_config
cli.config.choose_config(path)
Helper method for choosing a axolotl config YAML file (considering only files
ending with .yml or .yaml). If more than one config file exists in the passed
path, the user is prompted to choose one.
Parameters
Name
Type
Description
Default
path
Path
Directory in which config file(s) are stored.
required
Returns
Name
Type
Description
str
Path to either (1) the sole YAML file, or (2) if more than one YAML files exist,