Skip to content

Commit

Permalink
fix: double printing when training multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
sehoffmann committed Nov 18, 2023
1 parent ea8e01f commit 9e11fc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dmlcloud/training/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def setup_logging():
root_logger = logging.getLogger()
root_logger.setLevel(logging.INFO if hvd.rank() == 0 else logging.WARNING)

if root_logger.hasHandlers():
return

stdout_handler = logging.StreamHandler(sys.stdout)
stdout_handler.setLevel(logging.DEBUG)
stdout_handler.setFormatter(logging.Formatter())
Expand Down

0 comments on commit 9e11fc6

Please sign in to comment.