umami.configuration package#
Submodules#
umami.configuration.base module#
Base modul for process configuration (preprocessing, training, …).
umami.configuration.configuration module#
Configuration for logger of umami and tensorflow as well as reading global config.
- class umami.configuration.configuration.CustomFormatter(fmt=None, datefmt=None, style='%', validate=True)#
- Bases: - Formatter- Logging Formatter to add colors and count warning / errors using implementation from https://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output - FORMATS = {10: '\x1b[38;21m%(asctime)s - %(levelname)s:%(name)s: %(message)s (%(filename)s:%(lineno)d)\x1b[0m', 20: '\x1b[32;21m%(levelname)s:%(name)s: %(message)s\x1b[0m', 30: '\x1b[33;21m%(levelname)s:%(name)s: %(message)s\x1b[0m', 40: '\x1b[31;21m%(asctime)s - %(levelname)s:%(name)s: %(message)s (%(filename)s:%(lineno)d)\x1b[0m', 50: '\x1b[31;1m%(asctime)s - %(levelname)s:%(name)s: %(message)s (%(filename)s:%(lineno)d)\x1b[0m'}#
 - bold_red = '\x1b[31;1m'#
 - date_format = '%(levelname)s:%(name)s: %(message)s'#
 - debugformat = '%(asctime)s - %(levelname)s:%(name)s: %(message)s (%(filename)s:%(lineno)d)'#
 - format(record)#
- Format the specified record as text. - The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message. 
 - green = '\x1b[32;21m'#
 - grey = '\x1b[38;21m'#
 - red = '\x1b[31;21m'#
 - reset = '\x1b[0m'#
 - yellow = '\x1b[33;21m'#
 
- class umami.configuration.configuration.GlobalConfiguration#
- Bases: - object- This is a global configuration to allow certain settings which are hardcoded so far. - get_configuration()#
- Assign configuration from file to class variables. - Raises:
- KeyError – if required config is not present in passed config file 
 
 - load_config_file()#
- Load config file from disk. 
 - set_logging_level() object#
- Set DebugLevel for logging. - Returns:
- Umami logger. 
- Return type:
- object 
 
 - set_mpl_plotting_backend()#
- Setting the plotting backend of matplotlib. 
 - set_tf_debug_level()#
- Setting the Debug level of tensorflow. For reference see https://stackoverflow.com/questions/35869137/avoid-tensorflow-print-on-standard-error 
 
- umami.configuration.configuration.set_log_level(umami_logger, log_level: str)#
- Setting log level - Parameters:
- umami_logger (logger) – logger object 
- log_level (str) – logging level corresponding CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET