[Dy2Stat-log] Add feature also_to_stdout and optimize log messages#27285
Merged
liym27 merged 10 commits intoPaddlePaddle:developfrom Sep 17, 2020
Merged
[Dy2Stat-log] Add feature also_to_stdout and optimize log messages#27285liym27 merged 10 commits intoPaddlePaddle:developfrom
liym27 merged 10 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
|
✅ This PR's description meets the template requirements! |
121d3b0 to
6fea372
Compare
chenwhql
reviewed
Sep 15, 2020
zhhsplendid
reviewed
Sep 15, 2020
Change-Id: Ic336435937f9bc2dc9bf89fc5591d737d1b76936
Change-Id: Id128d122c632d5e06064d831ded4a381959f2ad7
Change-Id: If51c3c7606cab191bd971faa22cc21da7af651ea
Change-Id: I6b7bf6f56447dd825a15bb077194e11d03f76476
Change-Id: I4d489342fa7220e2e806d06d942c36d1ab49d1eb
Change-Id: I79050c2a8436d44cd5cf22f41aad0be1036a1cda
Change-Id: I52ddd1f3518a8ebbbc082bb2d4896da554b89a79
Change-Id: I5acea6b0ae25b9c1c405b979ab24d6e8ae7c3ba2
d0d1d64 to
e6b9166
Compare
lanxianghit
approved these changes
Sep 17, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Describe
1. New features: also output log or code to
sys.stdoutalso_to_stdoutfor APIpaddle.jit.set_verbosityto control whether to also output log messages tosys.stdout.also_to_stdoutfor APIpaddle.jit.set_code_levelto control whether to also output code tosys.stdout.2. Optimize log messages in dygraph-to-static
Dynamic-to-Staticin logger format so that logs about Dynamic-to-Static can be distinguished from other logs3. In dygraph-to-static, use log function from
logging_utilsto make the log more standardizedUse
logging_utils.warnto replace other warn function likelogging.warning,_logger.warningandwarnings.warnin dygraph_to_static优化 log 展示效果,方便区分动转静和框架其他log
1. 新特性:也可以输出 log 或 code 到
sys.stdoutpaddle.jit.set_verbosity增加参数also_to_stdout控制是否也将日志信息输出到sys.stdoutpaddle.jit.set_code_level增加参数also_to_stdout控制是否也将code信息输出到sys.stdout2. 优化动转静中的 log 信息
Dynamic-to-Static,使得动转静 log 与框架其他 log 区分开3. 动转静的 log/warning等 统一使用
logging_utils中的接口,以规范化动转静 log (动转静log 会统一Dynamic-to-Static标识,统一控制是否输出到 stdout)本PR修改:使用
logging_utils.warn替代了动转静相关文件中的 warn 函数 如logging.warning,_logger.warning和warnings.warn文档预览图
set_code_level
set_verbosity