Skip to content

Commit

Permalink
only set level log for zero band
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed Sep 22, 2024
1 parent 8553a73 commit 7846ee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zeroband/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def get_logger():

if world_info.local_rank == 0:
log_level = os.getenv("ZERO_BAND_LOG_LEVEL", "INFO")
logging.basicConfig(level=getattr(logging, log_level, logging.INFO))
logger.setLevel(level=getattr(logging, log_level, logging.INFO))
else:
logging.basicConfig(level=logging.CRITICAL) # Disable logging for non-zero ranks
logger.setLevel(level=logging.CRITICAL) # Disable logging for non-zero ranks

handler = logging.StreamHandler()
handler.setFormatter(CustomFormatter(world_info.local_rank))
Expand Down

0 comments on commit 7846ee4

Please sign in to comment.