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

hierarchy

Returns the current hierarchy

Returns:current hierarchy
Return type:str
nested_get(key, *args, **kwargs)

Returns all occurances of key in self and subdicts

Parameters:
  • 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 given

Returns:

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 invalid
Returns: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
training_on_top

Return whether the training hierarchy is on top

Returns:whether training is on top
Return type:bool
variability_on_top

Return whether the variability is on top

Returns:whether variability is on top
Return type:bool