mirror of
https://github.com/NanjingForestryUniversity/supermachine-tobacco.git
synced 2025-11-08 14:23:55 +00:00
修改了logging的bug
This commit is contained in:
parent
210c7354cf
commit
6f2a9a1643
@ -78,7 +78,7 @@ def set_logging(name=None, verbose=VERBOSE):
|
||||
for h in logging.root.handlers:
|
||||
logging.root.removeHandler(h) # remove all handlers associated with the root logger object
|
||||
rank = int(os.getenv('RANK', -1)) # rank in world for Multi-GPU trainings
|
||||
logging.basicConfig(format="%(message)s", level=logging.INFO if (verbose and rank in (-1, 0)) else logging.WARNING)
|
||||
# logging.basicConfig(format="%(message)s", level=logging.INFO if (verbose and rank in (-1, 0)) else logging.WARNING)
|
||||
return logging.getLogger(name)
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user