glenn-jocher
commited on
Commit
•
b92430a
1
Parent(s):
b17629e
Update hubconf.py to reset logging level to INFO (#8680)
Browse files- hubconf.py +2 -2
hubconf.py
CHANGED
@@ -34,7 +34,6 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
|
|
34 |
from utils.general import LOGGER, check_requirements, intersect_dicts, logging
|
35 |
from utils.torch_utils import select_device
|
36 |
|
37 |
-
level = LOGGER.level
|
38 |
if not verbose:
|
39 |
LOGGER.setLevel(logging.WARNING)
|
40 |
check_requirements(exclude=('tensorboard', 'thop', 'opencv-python'))
|
@@ -58,7 +57,8 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
|
|
58 |
model.names = ckpt['model'].names # set class names attribute
|
59 |
if autoshape:
|
60 |
model = AutoShape(model) # for file/URI/PIL/cv2/np inputs and NMS
|
61 |
-
|
|
|
62 |
return model.to(device)
|
63 |
|
64 |
except Exception as e:
|
|
|
34 |
from utils.general import LOGGER, check_requirements, intersect_dicts, logging
|
35 |
from utils.torch_utils import select_device
|
36 |
|
|
|
37 |
if not verbose:
|
38 |
LOGGER.setLevel(logging.WARNING)
|
39 |
check_requirements(exclude=('tensorboard', 'thop', 'opencv-python'))
|
|
|
57 |
model.names = ckpt['model'].names # set class names attribute
|
58 |
if autoshape:
|
59 |
model = AutoShape(model) # for file/URI/PIL/cv2/np inputs and NMS
|
60 |
+
if not verbose:
|
61 |
+
LOGGER.setLevel(logging.INFO) # reset to default
|
62 |
return model.to(device)
|
63 |
|
64 |
except Exception as e:
|