nvflare.fuel.utils.wfconf module¶
- class Configurator(app_root: str, cmd_vars: dict, env_config: dict, wf_config_file_name: str, base_pkgs: List[str], module_names: List[str], exclude_libs=True, default_vars=None, num_passes=1, element_filter=None, var_processor=None)[source]¶
Bases:
JsonObjectProcessor
Base class of Configurator to parse JSON configuration.
- Parameters:
app_root – app root
cmd_vars – command vars
env_config – environment configuration
wf_config_file_name – config file name
base_pkgs – base packages
module_names – module names
exclude_libs – whether to exclude libs
default_vars – default vars
num_passes – number of passes
element_filter – element filter
var_processor – variable processor
- finalize_config(config_ctx: ConfigContext)[source]¶
- process_config_element(config_ctx: ConfigContext, node: Node)[source]¶
- process_element(node: Node)[source]¶
This method is called by the scan() function for each JSON element scanned.
- Parameters:
node – the node representing the JSON element
- start_config(config_ctx: ConfigContext)[source]¶
- get_component_refs(component)[source]¶
Get component reference.
- Parameters:
component – string for component
Returns: list of component and reference
- resolve_var_refs(scanner: JsonScanner, var_values: dict)[source]¶
Resolve var references in the config contained in the scanner
- Parameters:
scanner – the scanner that contains config data to be resolved
var_values – the dict that contains var values.
Returns: None