Commit e53bf227 authored by Yuxin Wu's avatar Yuxin Wu

Make disable_layer_logging public

parent cc2322bb
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# File: common.py # File: common.py
from .registry import layer_register # noqa from .registry import layer_register, disable_layer_logging # noqa
from .tflayer import rename_tflayer_get_variable from .tflayer import rename_tflayer_get_variable
from .utils import VariableHolder # noqa from .utils import VariableHolder # noqa
__all__ = ['layer_register', 'VariableHolder', 'rename_tflayer_get_variable'] __all__ = ['layer_register', 'VariableHolder', 'rename_tflayer_get_variable',
'disable_layer_logging']
...@@ -18,7 +18,7 @@ from ..utils import logger ...@@ -18,7 +18,7 @@ from ..utils import logger
_LAYER_LOGGED = set() _LAYER_LOGGED = set()
_LAYER_REGISTRY = {} _LAYER_REGISTRY = {}
__all__ = ['layer_register'] __all__ = ['layer_register', 'disable_layer_logging']
_NameConflict = "LAYER_NAME_CONFLICT!!" _NameConflict = "LAYER_NAME_CONFLICT!!"
......
...@@ -237,8 +237,8 @@ def start_proc_mask_signal(proc): ...@@ -237,8 +237,8 @@ def start_proc_mask_signal(proc):
if sys.version_info < (3, 4) or mp.get_start_method() == 'fork': if sys.version_info < (3, 4) or mp.get_start_method() == 'fork':
log_once( log_once(
"Starting a process with 'fork' method is not safe and may consume unnecessary extra CPU memory." "Starting a process with 'fork' method is not safe and may consume unnecessary extra CPU memory."
" Use 'forkserver/spawn' method (available after Py3.4) instead if you run into any issues. " " Use 'forkserver' or 'spawn' method (available after Py3.4) instead if you run into any issues. "
"See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods", "See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods on how to set them.",
'warn') # noqa 'warn') # noqa
p.start() p.start()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment