Distributed Logger
xrsrke opened this issue · 1 comments
xrsrke commented
Print log messages based on a specific rank or ParallelMode neatly to the terminal, and save them to a local file. Let the user configure the file path and file name. By default, save the log using the name
passed in by the user.
APIs
from pipegoose.distributed import ParallelMode
from pipegoose.distributed.logger import DistributedLogger
logger = DistributedLogger("latency_logger", parallel_context)
logger.info("hello", parallel_mode=ParallelMode.GLOBAL)
logger.warning("hello", parallel_mode=ParallelMode.GLOBAL)
logger.debug("hello", parallel_mode=ParallelMode.GLOBAL)
logger.error("hello", parallel_mode=ParallelMode.GLOBAL)
# other arguments
logger.info("hello", rank=0, parallel_mode=ParallelMode.GLOBAL)
logger.info("hello", rank=0, parallel_mode=ParallelMode.TENSOR)
TODO
- Save log message by a specific rank in ParallelMode
- Save log message by all ranks in a ParallelMode
KevorkSulahian commented