Skip to content

Commit

Permalink
fix logger in callback
Browse files Browse the repository at this point in the history
  • Loading branch information
zhtmike committed Jun 28, 2023
1 parent 2b95dc0 commit 3c08a3c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mindocr/utils/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ def __init__(
self.loader_eval = loader
self.network = network
self.ema = ema
self.logger = Logger("mindocr")

if logger is None:
self.logger = Logger("mindocr", rank=self.rank_id)
else:
self.logger = logger

self.val_interval = val_interval
self.val_start_epoch = val_start_epoch
self.log_interval = log_interval
Expand Down

0 comments on commit 3c08a3c

Please sign in to comment.