-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[2.1 API] Enable printing deprecated warning info. #32712
[2.1 API] Enable printing deprecated warning info. #32712
Conversation
Thanks for your contribution! |
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
python/paddle/nn/__init__.py
Outdated
@@ -146,6 +146,7 @@ | |||
@deprecated( | |||
since="2.0.0", | |||
update_to="paddle.nn.funcitional.diag_embed", | |||
level=1, | |||
reason="diag_embed in paddle.nn will removed in future") |
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.
will be removed
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.
Done. Thanks.
python/paddle/nn/__init__.py
Outdated
@@ -157,6 +158,7 @@ def diag_embed(*args): | |||
@deprecated( | |||
since="2.0.0", | |||
update_to="paddle.nn.utils.remove_weight_norm", | |||
level=1, | |||
reason="remove_weight_norm in paddle.nn will removed in future") |
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.
will be removed
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.
Done. Thanks.
python/paddle/nn/__init__.py
Outdated
@@ -168,6 +170,7 @@ def remove_weight_norm(*args): | |||
@deprecated( | |||
since="2.0.0", | |||
update_to="paddle.nn.utils.weight_norm", | |||
level=1, | |||
reason="weight_norm in paddle.nn will removed in future") |
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.
will be removed
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.
Done. Thanks.
python/paddle/nn/functional/loss.py
Outdated
@@ -1096,7 +1096,8 @@ def ctc_loss(log_probs, | |||
return loss_out | |||
|
|||
|
|||
@deprecated(since="2.0.0", update_to="paddle.nn.functional.cross_entropy") | |||
@deprecated( | |||
since="2.0.0", update_to="paddle.nn.functional.cross_entropy", level=1) |
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.
是不是在reason参数里说明一下,paddle.nn.functional.cross_entropy
和 softmax_with_cross_entropy
的行为是不一致的。
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.
Done. Thanks.
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
* Add deprecated warning info. * Add unittest for deprecated decorator. * Add warning info for tensor.grad
PR types
Bug fixes
PR changes
APIs
Describe
Enable printing deprecated warning info. Included: