-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dy2Stat-log] Add feature also_to_stdout and optimize log messages #27285
Conversation
Thanks for your contribution! |
✅ This PR's description meets the template requirements! |
121d3b0
to
6fea372
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Describe
1. New features: also output log or code to
sys.stdout
also_to_stdout
for APIpaddle.jit.set_verbosity
to control whether to also output log messages tosys.stdout
.also_to_stdout
for APIpaddle.jit.set_code_level
to control whether to also output code tosys.stdout
.2. Optimize log messages in dygraph-to-static
Dynamic-to-Static
in logger format so that logs about Dynamic-to-Static can be distinguished from other logs3. In dygraph-to-static, use log function from
logging_utils
to make the log more standardizedUse
logging_utils.warn
to replace other warn function likelogging.warning
,_logger.warning
andwarnings.warn
in dygraph_to_static优化 log 展示效果,方便区分动转静和框架其他log
1. 新特性:也可以输出 log 或 code 到
sys.stdout
paddle.jit.set_verbosity
增加参数also_to_stdout
控制是否也将日志信息输出到sys.stdout
paddle.jit.set_code_level
增加参数also_to_stdout
控制是否也将code信息输出到sys.stdout
2. 优化动转静中的 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