xlstm_jax.trainer.logger.cmd_logging#

Logging setup for the command line interface.

Ported from NX-AI/xlstm-dev

Attributes#

Functions#

setup_exception_logging()

Make sure that uncaught exceptions are logged with the logger.

get_loglevel()

Get loglevel from LOGLEVEL environment variable.

setup_logging([logfile])

Initialize logging to logfile and stdout.

setup_logging_multiprocess([logfile])

Initialize logging to logfile and stdout for JAX distributed training.

Module Contents#

xlstm_jax.trainer.logger.cmd_logging.LOG_FORMAT = '[%(asctime)s][%(name)s:%(lineno)d][%(levelname)s]{rank} - %(message)s'#
xlstm_jax.trainer.logger.cmd_logging.LOGGER#
xlstm_jax.trainer.logger.cmd_logging.setup_exception_logging()#

Make sure that uncaught exceptions are logged with the logger.

xlstm_jax.trainer.logger.cmd_logging.get_loglevel()#

Get loglevel from LOGLEVEL environment variable.

Returns:

loglevel

Return type:

str

xlstm_jax.trainer.logger.cmd_logging.setup_logging(logfile='output.log')#

Initialize logging to logfile and stdout.

Parameters:

logfile (str) – Name of the log file. Defaults to “output.log”.

xlstm_jax.trainer.logger.cmd_logging.setup_logging_multiprocess(logfile='output.log')#

Initialize logging to logfile and stdout for JAX distributed training.

Parameters:

logfile (str) – Name of the log file. Defaults to “output.log”.