mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 00:07:42 +01:00
fix log level
This commit is contained in:
@@ -369,7 +369,7 @@ class VTONLandmark(nn.Module):
|
||||
'SHIFT_HEATMAP': True
|
||||
},
|
||||
'DEBUG': {
|
||||
'DEBUG': True,
|
||||
'DEBUG': False,
|
||||
'SAVE_BATCH_IMAGES_GT': True,
|
||||
'SAVE_BATCH_IMAGES_PRED': True,
|
||||
'SAVE_HEATMAPS_GT': True,
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# Part of the implementation is borrowed and modified from PackNet-SfM,
|
||||
# made publicly available under the MIT License at https://github.com/TRI-ML/packnet-sfm
|
||||
import importlib
|
||||
import logging
|
||||
import os
|
||||
import warnings
|
||||
from collections import OrderedDict
|
||||
from inspect import signature
|
||||
|
||||
@@ -16,23 +13,6 @@ from modelscope.models.cv.video_depth_estimation.utils.misc import (make_list,
|
||||
from modelscope.models.cv.video_depth_estimation.utils.types import is_str
|
||||
|
||||
|
||||
def set_debug(debug):
|
||||
"""
|
||||
Enable or disable debug terminal logging
|
||||
|
||||
Parameters
|
||||
----------
|
||||
debug : bool
|
||||
Debugging flag (True to enable)
|
||||
"""
|
||||
# Disable logging if requested
|
||||
if not debug:
|
||||
os.environ['NCCL_DEBUG'] = ''
|
||||
os.environ['WANDB_SILENT'] = 'false'
|
||||
warnings.filterwarnings('ignore')
|
||||
logging.disable(logging.CRITICAL)
|
||||
|
||||
|
||||
def filter_args(func, keys):
|
||||
"""
|
||||
Filters a dictionary so it only contains keys that are arguments of a function
|
||||
|
||||
@@ -11,6 +11,7 @@ formatter = logging.Formatter(
|
||||
'%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
|
||||
default_log_level = int(os.getenv('MODELSCOPE_LOG_LEVEL', str(logging.INFO)))
|
||||
logging.getLogger('numba').setLevel(logging.INFO)
|
||||
|
||||
|
||||
def get_logger(log_file: Optional[str] = None,
|
||||
|
||||
@@ -5,7 +5,6 @@ from modelscope.hub.api import HubApi
|
||||
from modelscope.utils.logger import get_logger
|
||||
|
||||
logger = get_logger()
|
||||
logger.setLevel('DEBUG')
|
||||
DEFAULT_GIT_PATH = 'git'
|
||||
download_model_file_name = 'test.bin'
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ from modelscope.utils.test_utils import (TEST_ACCESS_TOKEN1,
|
||||
TEST_MODEL_ORG, delete_credential)
|
||||
|
||||
logger = get_logger()
|
||||
logger.setLevel('DEBUG')
|
||||
DEFAULT_GIT_PATH = 'git'
|
||||
download_model_file_name = 'test.bin'
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ from modelscope.utils.test_utils import (TEST_ACCESS_TOKEN1,
|
||||
TEST_MODEL_ORG)
|
||||
|
||||
logger = get_logger()
|
||||
logger.setLevel('DEBUG')
|
||||
download_model_file_name = 'test.bin'
|
||||
download_model_file_name2 = 'test2.bin'
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ from modelscope.utils.test_utils import (TEST_ACCESS_TOKEN1,
|
||||
TEST_MODEL_ORG)
|
||||
|
||||
logger = get_logger()
|
||||
logger.setLevel('DEBUG')
|
||||
download_model_file_name = 'test.bin'
|
||||
download_model_file_name2 = 'test2.bin'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user