Parameters¶
Parameters¶
-
class
Parameters
(fixed_params={'model': {}, 'training': {}}, variable_params={'model': {}, 'training': {}})[source]¶ Bases:
delira.utils.config.LookupConfig
Class Containing all variable and fixed parameters for training and model instantiation
See also
trixi.util.Config
-
nested_get
(key, *args, **kwargs)¶ Returns all occurances of
key
inself
and subdictsParameters: - key (str) – the key to search for
- *args – positional arguments to provide default value
- **kwargs – keyword arguments to provide default value
Raises: KeyError
– Multiple Values are found for key (unclear which value should be returned) OR No Value was found for key and no default value was givenReturns: value corresponding to key (or default if value was not found)
Return type: Any
-
permute_hierarchy
()[source]¶ switches hierarchy
Returns: the class with a permuted hierarchy Return type: Parameters Raises: AttributeError
– if no valid hierarchy is found
-
permute_to_hierarchy
(hierarchy: str)[source]¶ Permute hierarchy to match the specified hierarchy
Parameters: hierarchy (str) – target hierarchy Raises: ValueError
– Specified hierarchy is invalidReturns: parameters with proper hierarchy Return type: Parameters
-
permute_training_on_top
()[source]¶ permutes hierarchy in a way that the training-model hierarchy is on top
Returns: Parameters with permuted hierarchy Return type: Parameters
-
permute_variability_on_top
()[source]¶ permutes hierarchy in a way that the training-model hierarchy is on top
Returns: Parameters with permuted hierarchy Return type: Parameters
-
save
(filepath: str)[source]¶ Saves class to given filepath (YAML + Pickle)
Parameters: filepath (str) – file to save data to
-