dcase_framework.parameters.ParameterContainer¶
-
class
dcase_framework.parameters.
ParameterContainer
(*args, **kwargs)[source]¶ Constructor
Parameters: project_base : str
Absolute path to the project root
section_process_order : list, optional
Parameter section processing order. Given dict is used to override internal default list. Default value “None”
path_structure : dict of lists, optional
Defines how paths are created, section hash is used to create unique folder names. Given dict is used to override internal default list. Default value “None”
method_dependencies : dict of dicts, optional
Given dict is used to override internal default list. Default value “None”
magic_field : dict, optional
Dict of field names for specific tasks. Given dict is used to override internal default list. Default value “None”
non_hashable_fields : list, optional
List of fields skipped when parameter hash for the section is calculated. Given list is used to override internal default list. Default value “None”
control_sections : list, optional
List of top level sections used for framework control, for these section no hash is calculated. Given list is used to override internal default list. Default value “None”
-
__init__
(*args, **kwargs)[source]¶ Constructor
Parameters: project_base : str
Absolute path to the project root
section_process_order : list, optional
Parameter section processing order. Given dict is used to override internal default list. Default value “None”
path_structure : dict of lists, optional
Defines how paths are created, section hash is used to create unique folder names. Given dict is used to override internal default list. Default value “None”
method_dependencies : dict of dicts, optional
Given dict is used to override internal default list. Default value “None”
magic_field : dict, optional
Dict of field names for specific tasks. Given dict is used to override internal default list. Default value “None”
non_hashable_fields : list, optional
List of fields skipped when parameter hash for the section is calculated. Given list is used to override internal default list. Default value “None”
control_sections : list, optional
List of top level sections used for framework control, for these section no hash is calculated. Given list is used to override internal default list. Default value “None”
Methods
__init__
(\*args, \*\*kwargs)Constructor clear
(() -> None. Remove all items from D.)copy
(() -> a shallow copy of D)detect_file_format
(filename)Detect file format from extension empty
()Check if file is empty exists
()Checks that file exists fromkeys
(...)v defaults to None. get
((k[,d]) -> D[k] if k in D, ...)get_dump_content
(data)Clean internal content for saving get_file_information
()Get file information, filename get_hash
([data])Get unique hash string (md5) for given parameter dict get_hash_for_path
([dotted_path])get_path
(dotted_path[, default, data])Get value from nested dict with dotted path has_key
((k) -> True if D has a key k, else False)items
(() -> list of D’s (key, value) pairs, ...)iteritems
(() -> an iterator over the (key, ...)iterkeys
(() -> an iterator over the keys of D)itervalues
(...)keys
(() -> list of D’s keys)load
(\*args, \*\*kwargs)Load file log
([level])Log container content merge
(override[, target])Recursive dict merge override
(override)Override container content recursively. pop
((k[,d]) -> v, ...)If key is not found, d is returned if given, otherwise KeyError is raised popitem
(() -> (k, v), ...)2-tuple; but raise KeyError if D is empty. process
([create_directories, ...])Process parameters process_method_parameters
(section)Process methods and recipes in the section save
(\*args, \*\*kwargs)Save file set_path
(dotted_path, new_value[, data])Set value in nested dict with dotted path setdefault
((k[,d]) -> D.get(k,d), ...)show
()Print container content update
(([E, ...)If E present and has a .keys() method, does: for k in E: D[k] = E[k] values
(() -> list of D’s values)viewitems
(...)viewkeys
(...)viewvalues
(...)Attributes
valid_formats
-