未验证 提交 d006c7ff 编写于 作者: Z ziyoujiyi 提交者: GitHub

py36 Import error bug fix (#41135)

* lazy import

* log error
上级 4d6a3b9f
......@@ -15,7 +15,6 @@
import warnings
import os
import paddle.distributed.fleet.proto.the_one_ps_pb2 as ps_pb2
import paddle.fluid as fluid
import paddle.distributed.fleet as fleet
from paddle.fluid import core
......@@ -27,6 +26,7 @@ from paddle.fluid.parallel_executor import ParallelExecutor
from paddle.fluid.framework import Variable, Parameter
from paddle.distributed.fleet.runtime.runtime_base import RuntimeBase
from paddle.distributed.fleet.base.private_helper_function import wait_server_ready
import paddle.distributed.fleet.proto.the_one_ps_pb2 as ps_pb2
from paddle.fluid.communicator import Communicator, HeterClient
from google.protobuf import text_format
......
......@@ -59,7 +59,8 @@ DATA_NORM_GRAD_NAME = [x + "@GRAD" for x in DATA_NORM_NAME]
def logger_config(log_path, logging_name):
logger = logging.getLogger(logging_name)
logger.setLevel(level=logging.DEBUG)
handler = logging.FileHandler(log_path, mode='a', encoding='UTF-8')
handler = logging.FileHandler(
log_path, mode='a', encoding='UTF-8', delay=True)
handler.setLevel(logging.INFO)
formatter = logging.Formatter(
'%(levelname)s - %(asctime)s - %(pathname)s: %(lineno)s - %(message)s')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册