parser¶
Classes¶
Class for parsing configuration files. |
Module Contents¶
- class parser.Parser(file_path: str)¶
Class for parsing configuration files.
- _SCHEMA_MAP¶
- _LOADER_MAP¶
- _PARSER_MAP¶
- file_path¶
- config_content¶
- config_type¶
- loader¶
- parser¶
- static load_yaml(filename: str) dict¶
Load the yaml file in a dictionary.
- Parameters:
filename (str) – The path to the yaml filename.
- Returns:
The read yaml file.
- Return type:
dict
- classmethod get_config_type(content: dict) str¶
Return the type of the configuration.
- Parameters:
content (dict) – The dictionary of the configuration contents.
- Returns:
The type of configuration model.
- Return type:
str
- classmethod get_loader(config_type: str)¶
Return the loader of the configuration.
- Parameters:
config_type (str) – The type of the configuration model.
- Returns:
The loader of the raw configuration.
- classmethod get_parser(config_type: str)¶
Return the parser of the configuration.
- Parameters:
config_type (str) – The type of the configuration model.
- Returns:
The parser of the raw configuration.
- parse()¶
Parse the component configuration file and get its arguments.
- Returns:
A dataclass of Component configs.
- Return type:
AMLConfig
- get_assets() dict¶
Get the assets of the configuration file.
Assets are resources needed to run jobs, pipelines, or to deploy configurations to an endpoint. The get_assets method returns a dictionary containing a list of each needed resource.
- Returns:
The dictionary of resources needed for the experiment.
- Return type:
dict