-
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
[Typing][A-64] Add type annotations for paddle/nn/functional/sparse_attention.py
#65064
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
paddle/nn/functional/sparse_attention.py
paddle/nn/functional/sparse_attention.py
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.
张师傅帮忙把 docstring 中的 Returns 也该以下吧 ~
Returns:
4-D tensor with shape:
改为
Returns:
Tensor: 4-D tensor with shape:
也就是,return type: description
这样的形式 ~
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.
不可以用 <return type>: <description>
的形式,会被 sphinx 解析出 type,渲染会很奇怪,用 <return type>, <description>
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
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.
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 Category
User Experience
PR Types
Improvements
Description
类型标注:
Related links
@SigureMo @megemini