forked from mindspore-Ecosystem/mindspore
log returns value
This commit is contained in:
parent
ca86a5455d
commit
25add231d2
|
@ -721,7 +721,7 @@ def set_context(**kwargs):
|
||||||
|
|
||||||
More options can refer to the implementation code. These options can also be set by environment
|
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.
|
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.
|
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.
|
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'].
|
Default: NO_TUNE. The value must be in ['RL', 'GA', 'RL,GA'].
|
||||||
|
|
|
@ -232,7 +232,9 @@ def get_level():
|
||||||
>>> import os
|
>>> import os
|
||||||
>>> os.environ['GLOG_v'] = '0'
|
>>> os.environ['GLOG_v'] = '0'
|
||||||
>>> from mindspore import log as logger
|
>>> from mindspore import log as logger
|
||||||
>>> logger.get_level()
|
>>> level = logger.get_level()
|
||||||
|
>>> print(level)
|
||||||
|
'0'
|
||||||
"""
|
"""
|
||||||
# level and glog level mapping dictionary
|
# level and glog level mapping dictionary
|
||||||
level_to_glog_level = dict(zip(_name_to_level.values(), _gloglevel_to_name.keys()))
|
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['logger_backupCount'] = '10'
|
||||||
>>> os.environ['GLOG_stderrthreshold'] = '2'
|
>>> os.environ['GLOG_stderrthreshold'] = '2'
|
||||||
>>> from mindspore import log as logger
|
>>> 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()
|
logger = _get_logger()
|
||||||
handler = logger.handlers[0]
|
handler = logger.handlers[0]
|
||||||
|
|
|
@ -45,6 +45,7 @@ def _check_mul():
|
||||||
def run_check():
|
def run_check():
|
||||||
"""
|
"""
|
||||||
Provide a convenient API to check if the installation is successful or failed.
|
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:
|
Examples:
|
||||||
>>> import mindspore
|
>>> import mindspore
|
||||||
|
|
Loading…
Reference in New Issue