flownet.config_parser._config_parser_hyperparam module
- flownet.config_parser._config_parser_hyperparam.create_ahm_config(base_config: pathlib.Path, hyperparameter_values: list, update_config: pathlib.Path) <property object at 0x7f15b0f78830>
Create a flownet ahm config file from a hyperparameter config file and the known drawn values for the hyperparameters.
- Parameters
base_config – Path to the hyperparameter config file.
hyperparameter_values – List of actual hyperparameter values to be run.
update_config – Path to config used for updating, like CI.
- Raises
ValueError – If the resulting ConfigSuite is invalid.
- Returns
A validated ConfigSuite with filled-in hyperparameter values ready to be run in flownet ahm.
- flownet.config_parser._config_parser_hyperparam.create_hyperopt_space(key: str, name: str, values: list) hyperopt.pyll.base.Apply
Function to create a hyperopt search space for a single hyperparameter.
- Parameters
key – Key in yaml file for the hyperparameter search space
name – Name of the search space type
values – Range of, or choices in the search space
- Raises
ValueError – If the search space type does not exists a value error will be raised
- Returns
A hyperopt search space for a single hyperparameter.
- flownet.config_parser._config_parser_hyperparam.list_hyperparameters(config_dict: dict, hyperparameters: list, in_config: str = '') list
List all hyperparameters defined in a yaml configuration file.
- Parameters
config_dict – configuration as dictionary
hyperparameters – list of hyperparameters already found (used for recursive calling of the function.)
in_config – path in the config file
- Returns
Return a list of all hyperparameters in the config.
- flownet.config_parser._config_parser_hyperparam.list_hyperparameters_names(config_dict: dict, hyperparameters: List[str], in_config: str = '') List[str]
List all hyperparameter names defined in a yaml configuration file.
- Parameters
config_dict – configuration as dictionary
hyperparameters – list of hyperparameters already found (used for recursive calling of the function.)
in_config – path in the config file
- Returns
Return a list of strings of names of the hyperparameters
- flownet.config_parser._config_parser_hyperparam.parse_hyperparam_config(base_config: pathlib.Path) list
Parse a flownet configuration file for hyperparameter tuning. This function will not parse the entire file and check for errors. It will merely extract the hyperparameters.
- Parameters
base_config – Path to the hyperparameter config file.
- Returns
List of hyperparameters.
- flownet.config_parser._config_parser_hyperparam.update_hyper_config(hyper_dict, hyperparameter_values, i=0) Tuple[dict, int]