Skip to content

Commit c07d1b8

Browse files
glenn-jocherClay Januhowski
authored andcommitted
Update hubconf.py to reset logging level to INFO (ultralytics#8680)
1 parent 49d8917 commit c07d1b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hubconf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
3434
from utils.general import LOGGER, check_requirements, intersect_dicts, logging
3535
from utils.torch_utils import select_device
3636

37-
level = LOGGER.level
3837
if not verbose:
3938
LOGGER.setLevel(logging.WARNING)
4039
check_requirements(exclude=('tensorboard', 'thop', 'opencv-python'))
@@ -58,7 +57,8 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
5857
model.names = ckpt['model'].names # set class names attribute
5958
if autoshape:
6059
model = AutoShape(model) # for file/URI/PIL/cv2/np inputs and NMS
61-
LOGGER.setLevel(level)
60+
if not verbose:
61+
LOGGER.setLevel(logging.INFO) # reset to default
6262
return model.to(device)
6363

6464
except Exception as e:

0 commit comments

Comments
 (0)