Skip to content
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]Filter UserWarings while @to_static #45754

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

Aurelius84
Copy link
Contributor

@Aurelius84 Aurelius84 commented Sep 5, 2022

PR types

Others

PR changes

Others

Describe

[Dy2Stat]Filter UserWarings while @to_static

ONLY filter DeprecationWarning,it will not and shall not deal with other warnings.

Before:

The behavior of expression A * B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A * B. This transitional warning will be dropped in the future.
  op_type, op_type, EXPRESSION_MAP[method_name]))
/workspace/env3.7/lib/python3.7/site-packages/paddle/fluid/layers/math_op_patch.py:381: UserWarning: /tmp/tmpf_v49bn0.py:28
The behavior of expression A * B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A * B. This transitional warning will be dropped in the future.
  op_type, op_type, EXPRESSION_MAP[method_name]))
/workspace/env3.7/lib/python3.7/site-packages/paddle/fluid/layers/math_op_patch.py:381: UserWarning: /tmp/tmpnxpgupfo.py:10
The behavior of expression A + B has been unified with elementwise_add(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_add(X, Y, axis=0) instead of A + B. This transitional warning will be dropped in the future.
  op_type, op_type, EXPRESSION_MAP[method_name]))
/workspace/env3.7/lib/python3.7/site-packages/paddle/fluid/layers/math_op_patch.py:381: UserWarning: /tmp/tmp0nglhird.py:9
The behavior of expression A * B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A * B. This transitional warning will be dropped in the future.
  op_type, op_type, EXPRESSION_MAP[method_name]))
/workspace/env3.7/lib/python3.7/site-packages/paddle/fluid/layers/math_op_patch.py:381: UserWarning: /tmp/tmp0nglhird.py:28
The behavior of expression A * B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A * B. This transitional warning will be dropped in the future.
  op_type, op_type, EXPRESSION_MAP[method_name]))
/workspace/env3.7/lib/python3.7/site-packages/paddle/fluid/layers/math_op_patch.py:381: UserWarning: /tmp/tmp_b_3skv4.py:10
The behavior of expression A + B has been unified with elementwise_add(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_add(X, Y, axis=0) instead of A + B. This transitional warning will be dropped in the future.
  op_type, op_type, EXPRESSION_MAP[method_name]))

@paddle-bot
Copy link

paddle-bot bot commented Sep 5, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

0x45f
0x45f previously approved these changes Sep 5, 2022
Copy link
Contributor

@0x45f 0x45f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aurelius84 Aurelius84 merged commit efccf89 into PaddlePaddle:develop Sep 6, 2022
Caozhou1995 pushed a commit to Caozhou1995/Paddle that referenced this pull request Sep 9, 2022
* [Dy2Stat]Filter UserWarings while @to_static

* only filter DeprecationWarning

* fix unittest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants