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][C-20] Add type annotations for python/paddle/distributed/communication/reduce.py #66803

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

megemini
Copy link
Contributor

PR Category

User Experience

PR Types

Improvements

Description

类型标注:

  • python/paddle/distributed/communication/reduce.py

Related links

@SigureMo @megemini

Copy link

paddle-bot bot commented Jul 30, 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.

@megemini
Copy link
Contributor Author

megemini commented Jul 30, 2024

这个文件有点特殊,修改了 ReduceOp 的类型为 IntEnum ,如果不修改这里的话,那么,相关的 op 类型就不能用 ReduceOp ,而是用 int 或者 Literal

看看这里是否需要修改 ReduceOp 的类型为 IntEnum

上面的办法不行,代码中有使用 str(dist.ReduceOp.SUM) 来判断值的地方 ... ... 已另添加 _ReduceOp 类型 ~

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 🐾

@SigureMo SigureMo merged commit 3e59023 into PaddlePaddle:develop Jul 31, 2024
31 checks passed
Lans1ot pushed a commit to Lans1ot/Paddle that referenced this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants