“7711d78cb3fa81eea5137c103ec49c04f3bdd109”上不存在“develop/api_doc/fluid/io.html”
提交 2ece967d 编写于 作者: Z zhangxuefei

fix the bug that log will be printed two times

上级 134e3fb9
...@@ -21,6 +21,7 @@ import os ...@@ -21,6 +21,7 @@ import os
import contextlib import contextlib
import time import time
import copy import copy
import logging
import paddle.fluid as fluid import paddle.fluid as fluid
from tb_paddle import SummaryWriter from tb_paddle import SummaryWriter
...@@ -286,6 +287,11 @@ class BasicTask(object): ...@@ -286,6 +287,11 @@ class BasicTask(object):
build_strategy=self.build_strategy) build_strategy=self.build_strategy)
self.exe.run(self.env.startup_program) self.exe.run(self.env.startup_program)
# to avoid to print logger two times in result of the logger usage of paddle-fluid
for handler in logging.root.handlers[:]:
logging.root.removeHandler(handler)
self._build_env_end_event() self._build_env_end_event()
@property @property
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册