Esempio n. 1
0
def main(args):
    """
    Setup logger and execute PLT classifier
    :param args: Arguments from the command line parsed using parse_command_line_args funtion
    :return: None
    """

    # LOGGER PARAMETERS
    LOG_FILE = 'plt_multiclass'
    # Root name of the log file. Execution time stamp will be appended to the filename
    # and will be created in ../logs/ directory
    LOG_LEVEL = 'info'
    # Log level: debug / info / warning / error / critical (Preferred: info)(Use debug during debugging)
    SHOW_LOG = False
    # If True, shows the log info in the run window.

    # LOGGER CONFIGURATION
    logger_config = Logger(__name__, log_file=LOG_FILE, log_level=LOG_LEVEL, show_log=SHOW_LOG)
    logger = logger_config.get_logger()

    # EXECUTE PLT MULTI-CLASS
    try:
        logger.info('Executing plt_multiclass with the arguments received')
        plt_multiclass(logger, **vars(args))
    except:
        print(f'\n\n!!! Error Occurred During Execution !!!\nCheck log file for further details\n'
              f'Log file: {logger.handlers[0].baseFilename}')
    pass
Esempio n. 2
0
def main(args):
    logger_config = Logger(__name__,
                           log_file='plt_multiclass',
                           log_level='debug',
                           show_log=False)
    logger = logger_config.get_logger()
    try:
        logger.info('Executing plt_multiclass with the arguements received')
        plt_multiclass(logger, **vars(args))
    except:
        print(
            f'\n\n!!! Error Occurred During Execution !!!\nCheck log file for further details\n'
            f'Log file: {logger.handlers[0].baseFilename}')
    pass