LOGGER consolidation (#5569)

* Logger consolidation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocherandpre-commit-ci[bot] authored and GitHub committed 2021-11-08 16:32:15 +01:00
1 parent 0de4a9c35d
commit 79bca2bf64
6 files changed
+13 -21

No files matched your search

+2 -3
View File
@@ -7,7 +7,6 @@ Usage:
"""
import argparse
import logging
import math
import os
import random
@@ -201,8 +200,8 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
# DP mode
if cuda and RANK == -1 and torch.cuda.device_count() > 1:
logging.warning('DP not recommended, instead use torch.distributed.run for best DDP Multi-GPU results.\n'
'See Multi-GPU Tutorial at https://github.com/ultralytics/yolov5/issues/475 to get started.')
LOGGER.warning('WARNING: DP not recommended, use torch.distributed.run for best DDP Multi-GPU results.\n'
'See Multi-GPU Tutorial at https://github.com/ultralytics/yolov5/issues/475 to get started.')
model = torch.nn.DataParallel(model)
# SyncBatchNorm