def my_handler(type_, value, tb):
    logger.info(('\n' + ''.join(traceback.format_exception(type, value, tb))))
    logging.info('Experiment finished (with some errors)')
def my_handler(type_, value, tb):
    logger.info(('\n' + .join(traceback.format_exception(type, value, tb))))
    logging.info('Experiment finished (with some errors)')