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-1,C-2,C-3] Add type annotations for python/paddle/distributed/{spawn,rpc/rpc,auto_parallel/api}.py #67428

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

megemini
Copy link
Contributor

PR Category

User Experience

PR Types

Improvements

Description

类型标注:

  • python/paddle/distributed/spawn.py
  • python/paddle/distributed/rpc/rpc.py
  • python/paddle/distributed/auto_parallel/api.py
  • python/paddle/distributed/auto_parallel/constants.py
  • python/paddle/distributed/auto_parallel/strategy.py

其中,

  • python/paddle/distributed/auto_parallel/constants.py

    把相关的 TypedDict 放到这个文件里面,以便后续维护 ~

  • python/paddle/distributed/auto_parallel/strategy.py

    这个文件里面的类,相当于把 constants.pydict 转换为类的属性了 ~

    个人感觉,在 strategy.py 里面再进行标注不太好,因为,这里面类的属性基本是动态的,后续维护不方便,需要手动同步 constants.py 中的属性,但是,也没找出什么好的办法,@SigureMo 看看有什么好的处理方式?

Related links

@SigureMo @megemini

Copy link

paddle-bot bot commented Aug 14, 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.

@luotao1 luotao1 added contributor External developers HappyOpenSource 快乐开源活动issue与PR labels Aug 14, 2024
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 🐾

@luotao1 luotao1 merged commit 961c3fb into PaddlePaddle:develop Aug 15, 2024
27 of 28 checks passed
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