Skip to content

[CodeStyle][Ruff][BUAA][D-[7-13]] Fix ruff RUF015 diagnostic for 6 files in python/paddle/ - #67359

Merged
SigureMo merged 11 commits into
PaddlePaddle:developfrom
MufanColin:ruff_d7_d13
Aug 14, 2024
Merged

SigureMo merged 11 commits into
PaddlePaddle:developfrom
MufanColin:ruff_d7_d13

Conversation

@MufanColin

Copy link
Copy Markdown
Contributor

PR Category

User Experience

PR Types

Devs

Description

  • python/paddle/distributed/passes/auto_parallel_data_parallel_optimization.py
  • python/paddle/distributed/transpiler/distribute_transpiler.py
  • python/paddle/pir/math_op_patch.py
  • python/paddle/static/amp/function_overload.py
  • setup.py
  • test/sot/test_model_switch_training.py
  • test/xpu/test_tril_triu_op_xpu.py

Related Links

@gouzil

@paddle-bot

paddle-bot Bot commented Aug 13, 2024

Copy link
Copy Markdown

你的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 the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Aug 13, 2024
for param_grad in params_grads
if param_grad[0].name == self.table_name
),
None, # Default value if no matching param_grad is found

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

为什么要修改原来的逻辑?原来如果找不到会直接报错,而现在会隐藏

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

那我是直接把 None 去掉吗?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

不要修改原有逻辑,去掉

@SigureMo SigureMo left a comment

Copy link
Copy Markdown
Collaborator

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 b4ae8dd into PaddlePaddle:develop Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants