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

[Typing][A-64] Add type annotations for paddle/nn/functional/sparse_attention.py #65064

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

Liyulingyue
Copy link
Contributor

PR Category

User Experience

PR Types

Improvements

Description

类型标注:

  • paddle/nn/functional/sparse_attention.py

Related links

@SigureMo @megemini

Copy link

paddle-bot bot commented Jun 12, 2024

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label Jun 12, 2024
@Liyulingyue Liyulingyue changed the title [Typing][A-13] Add type annotations for paddle/nn/functional/sparse_attention.py [Typing][A-64] Add type annotations for paddle/nn/functional/sparse_attention.py Jun 12, 2024
Copy link
Contributor

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 这样的形式 ~

Copy link
Member

@SigureMo SigureMo Jun 12, 2024

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>

cc @sunzhongkai588

Liyulingyue and others added 2 commits June 12, 2024 21:32
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

Copy link
Contributor

@megemini megemini left a comment

Choose a reason for hiding this comment

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

LGTM ~ 🎉

@SigureMo SigureMo merged commit 075cd37 into PaddlePaddle:develop Jun 12, 2024
31 of 33 checks passed
@SigureMo SigureMo added the HappyOpenSource 快乐开源活动issue与PR label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants