log returns value

This commit is contained in:
d00455729 2021-09-17 11:36:02 +08:00
parent ca86a5455d
commit 25add231d2
3 changed files with 9 additions and 3 deletions

View File

@ -721,7 +721,7 @@ def set_context(**kwargs):
More options can refer to the implementation code. These options can also be set by environment
variable MS_GRAPH_KERNEL_FLAGS, without modifying network source code.
For example, export MS_GRAPH_KERNEL_FLAGS=opt_level=2 dump_as_text.
For example, export MS_GRAPH_KERNEL_FLAGS="opt_level=2 dump_as_text".
enable_reduce_precision (bool): Whether to enable precision reduction. Default: True.
auto_tune_mode (str): The mode of auto tune when op building, get the best tiling performance.
Default: NO_TUNE. The value must be in ['RL', 'GA', 'RL,GA'].

View File

@ -232,7 +232,9 @@ def get_level():
>>> import os
>>> os.environ['GLOG_v'] = '0'
>>> from mindspore import log as logger
>>> logger.get_level()
>>> level = logger.get_level()
>>> print(level)
'0'
"""
# level and glog level mapping dictionary
level_to_glog_level = dict(zip(_name_to_level.values(), _gloglevel_to_name.keys()))
@ -356,7 +358,10 @@ def get_log_config():
>>> os.environ['logger_backupCount'] = '10'
>>> os.environ['GLOG_stderrthreshold'] = '2'
>>> from mindspore import log as logger
>>> logger.get_log_config()
>>> config= logger.get_log_config()
>>> print(config)
{'GLOG_v': '1', 'GLOG_logtostderr': '0', 'GLOG_log_dir': '/var/log',
'logger_maxBytes': '5242880', 'logger_backupCount': '10', 'GLOG_stderrthreshold': '2'}
"""
logger = _get_logger()
handler = logger.handlers[0]

View File

@ -45,6 +45,7 @@ def _check_mul():
def run_check():
"""
Provide a convenient API to check if the installation is successful or failed.
If there is no return value, the verification status will be displayed directly.
Examples:
>>> import mindspore