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

[CodeStyle][Ruff] Ruff 新 rule 引入计划(第二期) #67116

Closed
gouzil opened this issue Aug 7, 2024 · 13 comments
Closed

[CodeStyle][Ruff] Ruff 新 rule 引入计划(第二期) #67116

gouzil opened this issue Aug 7, 2024 · 13 comments
Assignees
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭 type/others 其他问题

Comments

@gouzil
Copy link
Member

gouzil commented Aug 7, 2024

任务背景

此次任务为 Python 端引入 ruff 作为代码风格检查/自动修复工具 的常规更新。

自引入 Ruff 以来,我们已经进行了多次的代码风格优化:#57367#51729。随着 Ruff 项目的发展,我们也会不断地更新代码风格规则,以适应更多的代码场景。因此,我们引入了新的代码质量管理规则,以便更好的管理代码质量。

实施步骤

安装 ruff v0.5.0

首先我们需要能够复现这 400 多个问题,首先就需要自己安装一下 Ruff

目前 paddle 所使用的 ruff 版本为 0.5.0,请使用相同版本确保问题的可复现性:

$ pip install ruff==0.5.0

问题复现

paddle/fluid/operators/generator/generate_op.py 文件的 Q003 规则为例

$ ruff check paddle/fluid/operators/generator/generate_op.py --select Q003
paddle/fluid/operators/generator/generate_op.py:461:29: Q003 [*] Change outer quotes to avoid escaping inner quotes
    |
459 |                     if args_index < len(args_list):
460 |                         attr_value = (
461 |                             f"this->GetAttr(\"{args_list[args_index]}\")"
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Q003
462 |                             if args_list[args_index] in bw_fluid_attrs_set
463 |                             else args_list[args_index]
    |
    = help: Change outer quotes to avoid escaping inner quotes

可以在 ruff rules 查找对应的规则。

问题修复

根据 Q003 规则 avoidable-escaped-quote 修复即可

459 |                     if args_index < len(args_list):
460 |                         attr_value = (
-461 |                             f"this->GetAttr(\"{args_list[args_index]}\")"
+461 |                             f'this->GetAttr("{args_list[args_index]}")'
462 |                             if args_list[args_index] in bw_fluid_attrs_set
463 |                             else args_list[args_index]

Note

  • 修改 Q003 的同学注意不要改出来 Q004 问题,修改完 Q003 需要再用 Q004 检查确认下

任务列表

Q003 🎉

序号 文件 认领人 Github id PR 链接
✅A-1 paddle/fluid/eager/auto_code_generator/generate_file_structures.py @Marcusryz #67300
✅A-2 paddle/fluid/eager/auto_code_generator/generator/codegen_utils.py @Marcusryz #67300
✅A-3 paddle/fluid/eager/auto_code_generator/generator/eager_gen.py @Marcusryz #67300
✅A-4 paddle/fluid/eager/auto_code_generator/generator/python_c_gen.py @Marcusryz #67300
✅A-5 paddle/fluid/operators/generator/generate_op.py @Marcusryz #67314
✅A-6 paddle/fluid/operators/generator/ops_extra_info_gen.py @Marcusryz #67314
✅A-7 paddle/fluid/pir/dialect/op_generator/api_gen.py @Marcusryz #67318
✅A-8 paddle/fluid/pir/dialect/op_generator/op_creator_drr_gen.py @Marcusryz #67318
✅A-9 paddle/fluid/pir/dialect/op_generator/op_gen.py @Marcusryz #67318
✅A-10 paddle/fluid/pir/dialect/op_generator/op_kerneltype_gen.py @Marcusryz #67318
✅A-11 paddle/phi/api/generator/api_base.py @Marcusryz #67410
✅A-12 paddle/phi/api/generator/dist_api_gen.py @Marcusryz #67410
✅A-13 paddle/phi/kernels/sparse/gpu/cutlass_generator/gather_gemm_scatter_manifest.py @Marcusryz #67410
✅A-14 python/paddle/distributed/auto_parallel/static/cost/op_runtime_cost.py @Marcusryz #67410
✅A-15 python/paddle/distributed/auto_parallel/strategy.py @Marcusryz #67410
✅A-16 python/paddle/distributed/fleet/launch.py @Marcusryz #67497
✅A-17 python/paddle/distributed/fleet/runtime/the_one_ps.py @Marcusryz #67497
✅A-18 python/paddle/incubate/distributed/fleet/fleet_util.py @Marcusryz #67497
✅A-19 python/paddle/jit/dy2static/transformers/name_load_transformer.py @Marcusryz #67497
✅A-20 python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py @Marcusryz #67497
✅A-21 python/paddle/nn/functional/pooling.py @Marcusryz
@gouzil
#67583
#67534
✅A-22 python/paddle/optimizer/optimizer.py @Marcusryz
@gouzil
#67583
#67534
✅A-23 test/cinn/test_paddle_model_convertor.py @Marcusryz
@gouzil
#67583
#67534
✅A-24 test/legacy_test/op.py @Marcusryz
@gouzil
#67583
#67534
✅A-25 test/legacy_test/test_operator_desc.py @Marcusryz
@gouzil
#67583
#67534
✅A-26 test/legacy_test/test_pool2d_op.py 🙋@Marcusryz
@gouzil
#67583
✅A-27 test/legacy_test/test_pool3d_op.py 🙋@Marcusryz
@gouzil
#67583
✅A-28 test/mkldnn/test_pool2d_bf16_mkldnn_op.py 🙋@Marcusryz
@gouzil
#67583
✅A-29 test/xpu/test_pool2d_op_xpu.py 🙋@Marcusryz
@gouzil
#67583
✅A-30 test/xpu/test_pool3d_op_xpu.py 🙋@Marcusryz
@gouzil
#67583
✅A-31 tools/CrossStackProfiler/CspFileReader.py 🙋@Marcusryz
@gouzil
#67583
✅A-32 tools/check_op_benchmark_result.py 🙋@Marcusryz
@gouzil
#67583
✅A-33 tools/jetson_infer_op.py 🙋@Marcusryz
@gouzil
#67583
✅A-34 tools/prune_for_jetson.py 🙋@Marcusryz
@gouzil
#67583

Q004 🎉

序号 文件 认领人 Github id PR 链接
✅B-1 python/paddle/distributed/fleet/meta_parallel/sharding/group_sharded_optimizer_stage2.py @MufanColin #67231
✅B-2 python/paddle/distributed/launch/controllers/ipu_controller.py @MufanColin #67231
✅B-3 test/legacy_test/prim_op_test.py @MufanColin #67231
✅B-4 test/legacy_test/test_run.py @MufanColin #67231
✅B-5 tools/externalError/spider.py @MufanColin #67231
✅B-6 tools/jetson_infer_op.py @MufanColin #67231

RSE102 🎉

序号 文件 认领人 Github id PR 链接
✅C-1 python/paddle/audio/backends/init_backend.py @Jeff114514 #67123
✅C-2 python/paddle/base/reader.py @Jeff114514 #67123
✅C-3 python/paddle/distributed/auto_parallel/static/auto_align_tool.py @Jeff114514 #67123
✅C-4 python/paddle/distributed/auto_tuner/tuner.py @Jeff114514 #67123
✅C-5 python/paddle/distributed/passes/pass_base.py @Jeff114514 #67123
✅C-6 python/paddle/incubate/distributed/fleet/parameter_server/distribute_transpiler/__init__.py @Jeff114514 #67123
✅C-7 python/paddle/incubate/distributed/fleet/parameter_server/pslib/__init__.py @Jeff114514 #67123
✅C-8 python/paddle/incubate/nn/attn_bias.py @Jeff114514 #67123
✅C-9 python/paddle/incubate/nn/layer/fused_transformer.py @Jeff114514 #67123
✅C-10 python/paddle/jit/dy2static/py_layer.py @Jeff114514 #67123
✅C-11 python/paddle/jit/sot/opcode_translator/executor/mutable_data.py @Jeff114514 #67124
✅C-12 python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py @Jeff114514 #67124
✅C-13 python/paddle/jit/sot/opcode_translator/executor/side_effects.py @Jeff114514 #67124
✅C-14 python/paddle/jit/sot/opcode_translator/executor/tracker.py @Jeff114514 #67124
✅C-15 python/paddle/jit/sot/opcode_translator/executor/variables/base.py @Jeff114514 #67124
✅C-16 python/paddle/jit/sot/opcode_translator/executor/variables/iter.py @Jeff114514 #67124
✅C-17 python/paddle/jit/sot/utils/utils.py @Jeff114514 #67124
✅C-18 python/paddle/nn/clip.py @Jeff114514 #67124
✅C-19 python/paddle/nn/initializer/initializer.py @Jeff114514 #67124
✅C-20 python/paddle/regularizer.py @Jeff114514 #67124
✅C-21 python/paddle/utils/environments.py @Jeff114514 #67125
✅C-22 test/book/notest_understand_sentiment.py @Jeff114514 #67125
✅C-23 test/deprecated/book/test_recognize_digits_deprecated.py @Jeff114514 #67125
✅C-24 test/deprecated/book/test_word2vec_book_deprecated.py @Jeff114514 #67125
✅C-25 test/deprecated/legacy_test/test_multiprocess_reader_exception.py @Jeff114514 #67125
✅C-26 test/distributed_passes/auto_parallel_pass_test_base.py @Jeff114514 #67125
✅C-27 test/distributed_passes/dist_pass_test_base.py @Jeff114514 #67125
✅C-28 test/ir/inference/auto_scan_test.py @Jeff114514 #67125
✅C-29 test/ir/inference/test_trt_convert_prelu.py @Jeff114514 #67125
✅C-30 test/legacy_test/check_nan_inf_base.py @Jeff114514 #67125
✅C-31 test/legacy_test/check_nan_inf_base_dygraph.py @Jeff114514 #67126
✅C-32 test/legacy_test/distributed_fused_lamb_test_base.py @Jeff114514 #67126
✅C-33 test/legacy_test/fleet_meta_optimizer_base.py @Jeff114514 #67126
✅C-34 test/legacy_test/test_imperative_optimizer.py @Jeff114514 #67126
✅C-35 test/legacy_test/test_imperative_optimizer_v2.py @Jeff114514 #67126
✅C-36 test/legacy_test/test_logcumsumexp_op.py @Jeff114514 #67126
✅C-37 test/legacy_test/test_nan_inf.py @Jeff114514 #67126

RUF015 🎉

序号 文件 认领人 Github id PR 链接
✅D-1 paddle/fluid/pir/dialect/op_generator/api_gen.py @MufanColin #67225
✅D-2 python/paddle/base/dygraph/tensor_patch_methods.py @MufanColin #67225
✅D-3 python/paddle/base/dygraph/tracer.py @MufanColin #67225
✅D-4 python/paddle/base/framework.py @MufanColin #67225
✅D-5 python/paddle/distributed/auto_parallel/static/reshard.py @MufanColin #67225
✅D-6 python/paddle/distributed/fleet/utils/hybrid_parallel_inference.py @MufanColin #67225
✅D-7 python/paddle/distributed/passes/auto_parallel_data_parallel_optimization.py @MufanColin #67359
✅D-8 python/paddle/distributed/transpiler/distribute_transpiler.py @MufanColin #67359
✅D-9 python/paddle/pir/math_op_patch.py @MufanColin #67359
✅D-10 python/paddle/static/amp/function_overload.py @MufanColin #67359
✅D-11 setup.py @MufanColin #67359
✅D-12 test/sot/test_model_switch_training.py @MufanColin #67359
✅D-13 test/xpu/test_tril_triu_op_xpu.py @MufanColin #67359

RUF017 🎉

序号 文件 认领人 Github id PR 链接
✅E-1 python/paddle/distributed/auto_parallel/static/reshard.py @Jeff114514 #67185

FURB 🎉

序号 文件 认领人 Github id PR 链接
✅F-1 python/paddle/amp/accuracy_compare.py @Whsjrczr #67264
✅F-2 python/paddle/distributed/auto_parallel/static/cost/base_cost.py @Whsjrczr #67264
✅F-3 python/paddle/distributed/auto_parallel/static/parallelizer.py @Whsjrczr #67264
✅F-4 python/paddle/distributed/auto_parallel/static/tuner/rule_based_tuner.py @Whsjrczr #67264
✅F-5 python/paddle/distributed/fleet/elastic/manager.py @Whsjrczr #67264
✅F-6 python/paddle/distributed/fleet/launch.py @Whsjrczr #67264
✅F-7 python/paddle/hapi/progressbar.py @Whsjrczr #67264
✅F-8 python/paddle/incubate/autograd/generate_op_map.py @Whsjrczr #67264
✅F-9 python/paddle/incubate/distributed/utils/io/save_for_auto.py @Whsjrczr #67264
✅F-10 python/paddle/incubate/jit/inference_decorator.py @Whsjrczr #67264
✅F-11 python/paddle/quantization/imperative/ptq_quantizer.py @Whsjrczr #67269
✅F-12 python/paddle/tensor/creation.py @Whsjrczr #67269
✅F-13 python/paddle/utils/cpp_extension/extension_utils.py @Whsjrczr #67269
✅F-14 python/paddle/vision/ops.py @Whsjrczr #67269
✅F-15 setup.py @Whsjrczr #67269
✅F-16 test/deprecated/collective/fleet/dygraph_save_for_auto_infer.py @Whsjrczr #67269
✅F-17 test/dygraph_to_static/test_sentiment.py @Whsjrczr #67269
✅F-18 test/legacy_test/op_test.py @Whsjrczr #67269
✅F-19 test/legacy_test/test_concat_op.py @Whsjrczr #67269
✅F-20 test/legacy_test/test_dist_base.py @Whsjrczr #67269
✅F-21 test/legacy_test/test_dist_fleet_base.py @Whsjrczr #67279
✅F-22 test/legacy_test/test_hsigmoid_op.py @Whsjrczr #67279
✅F-23 test/legacy_test/test_imperative_deepcf.py @Whsjrczr #67279
✅F-24 test/legacy_test/test_nan_inf.py @Whsjrczr #67279
✅F-25 test/legacy_test/test_put_along_axis_op.py @Whsjrczr #67279
✅F-26 test/xpu/test_concat_op_xpu.py @Whsjrczr #67279
✅F-27 tools/check_ctest_hung.py @Whsjrczr #67279
✅F-28 tools/diff_use_default_grad_op_maker.py @Whsjrczr #67277
✅F-29 tools/externalError/spider.py @Whsjrczr #67277
✅F-30 tools/gen_ut_cmakelists.py @Whsjrczr #67277
✅F-31 tools/get_single_test_cov.py @Whsjrczr #67277
✅F-32 tools/get_ut_file_map.py @Whsjrczr #67277
✅F-33 tools/parse_kernel_info.py @Whsjrczr #67277
✅F-34 tools/sampcd_processor.py @Whsjrczr #67277
✅F-35 tools/sampcd_processor_utils.py @Whsjrczr #67277

RUF005 🎉

序号 文件 认领人 Github id PR 链接
✅G-1 paddle/fluid/pir/dialect/op_generator/op_gen.py 🙋@Fripping
@MufanColin
#67127
✅G-2 paddle/fluid/pir/dialect/op_generator/op_infermeta_func_gen.py 🙋@Fripping
@MufanColin
#67127
✅G-3 paddle/fluid/primitive/codegen/gen.py 🙋@Fripping
@MufanColin
#67127
✅G-4 paddle/phi/api/generator/dist_api_gen.py 🙋@Fripping
@MufanColin
#67127
✅G-5 paddle/phi/api/generator/tensor_operants_gen.py 🙋@Fripping
@MufanColin
#67127
✅G-6 python/paddle/__init__.py 🙋@Fripping
@MufanColin
#67128
✅G-7 python/paddle/audio/functional/window.py 🙋@Fripping
@MufanColin
#67128
✅G-8 python/paddle/base/backward.py 🙋@Fripping
@MufanColin
#67128
✅G-9 python/paddle/base/lod_tensor.py 🙋@Fripping
@MufanColin
#67128
✅G-10 python/paddle/dataset/imikolov.py 🙋@Fripping
@MufanColin
#67128
✅G-11 python/paddle/dataset/wmt14.py 🙋@Fripping
@MufanColin
#67363
✅G-12 python/paddle/dataset/wmt16.py 🙋@Fripping
@MufanColin
#67363
✅G-13 python/paddle/device/__init__.py 🙋@Fripping
@MufanColin
#67363
✅G-14 python/paddle/distributed/auto_parallel/static/callbacks.py 🙋@Fripping
@MufanColin
#67363
✅G-15 python/paddle/distributed/auto_parallel/static/cost/base_cost.py 🙋@Fripping
@MufanColin
#67363
✅G-16 python/paddle/distributed/auto_parallel/static/operators/dist_embedding.py 🙋@Fripping
@MufanColin
#67363
✅G-17 python/paddle/distributed/auto_parallel/static/parallelizer.py 🙋@Fripping
@MufanColin
#67363
✅G-18 python/paddle/distributed/auto_parallel/static/reshard.py 🙋@Fripping
@MufanColin
#67363
✅G-19 python/paddle/distributed/auto_parallel/static/tuner/optimization_tuner.py 🙋@Fripping
@MufanColin
#67363
✅G-20 python/paddle/distributed/auto_parallel/static/tuner/parallel_tuner.py 🙋@Fripping
@MufanColin
#67363
✅G-21 python/paddle/distributed/checkpoint/utils.py 🙋@Fripping
@MufanColin
#67376
✅G-22 python/paddle/distributed/fleet/base/util_factory.py 🙋@Fripping
@MufanColin
#67376
✅G-23 python/paddle/distributed/fleet/launch_utils.py 🙋@Fripping
@MufanColin
#67376
✅G-24 python/paddle/distributed/fleet/runtime/parameter_server_runtime.py 🙋@Fripping
@MufanColin
#67376
✅G-25 python/paddle/distributed/fleet/utils/fs.py 🙋@Fripping
@MufanColin
#67376
✅G-26 python/paddle/distributed/fleet/utils/tensor_fusion_helper.py 🙋@Fripping
@MufanColin
#67376
✅G-27 python/paddle/distributed/passes/auto_parallel_grad_clip.py 🙋@Fripping
@MufanColin
#67376
✅G-28 python/paddle/distributed/passes/pass_utils.py 🙋@Fripping
@MufanColin
#67376
✅G-29 python/paddle/distributed/passes/ps_trainer_pass.py 🙋@Fripping
@MufanColin
#67376
✅G-30 python/paddle/distributed/ps/utils/collective_transpiler.py 🙋@Fripping
@MufanColin
#67376
✅G-31 python/paddle/distributed/ps/utils/public.py 🙋@Fripping
@MufanColin
#67385
✅G-32 python/paddle/distributed/transpiler/collective.py 🙋@Fripping
@MufanColin
#67385
✅G-33 python/paddle/distributed/utils/launch_utils.py 🙋@Fripping
@MufanColin
#67385
✅G-34 python/paddle/distribution/lkj_cholesky.py 🙋@Fripping
@MufanColin
#67385
✅G-35 python/paddle/distribution/multinomial.py 🙋@Fripping
@MufanColin
#67385
✅G-36 python/paddle/distribution/multivariate_normal.py 🙋@Fripping
@MufanColin
#67385
✅G-37 python/paddle/hapi/callbacks.py 🙋@Fripping
@MufanColin
#67385
✅G-38 python/paddle/incubate/distributed/fleet/parameter_server/distribute_transpiler/__init__.py 🙋@Fripping
@MufanColin
#67385
✅G-39 python/paddle/incubate/distributed/fleet/parameter_server/ir/pserver_pass.py 🙋@Fripping
@MufanColin
#67385
✅G-40 python/paddle/incubate/distributed/fleet/parameter_server/ir/trainer_pass.py 🙋@Fripping
@MufanColin
#67385
✅G-41 python/paddle/incubate/distributed/fleet/utils.py @Fripping
🙋@MufanColin
#67259
✅G-42 python/paddle/incubate/multiprocessing/reductions.py @Fripping
🙋@MufanColin
#67259
✅G-43 python/paddle/incubate/nn/layer/fused_transformer.py @Fripping
🙋@MufanColin
#67259
✅G-44 python/paddle/jit/dy2static/program_translator.py @Fripping
🙋@MufanColin
#67259
✅G-45 python/paddle/jit/dy2static/transformers/decorator_transformer.py @Fripping
🙋@MufanColin
#67259
✅G-46 python/paddle/jit/dy2static/transformers/ifelse_transformer.py @Fripping
🙋@MufanColin
#67259
✅G-47 python/paddle/jit/dy2static/transformers/logical_transformer.py @Fripping
🙋@MufanColin
#67259
✅G-48 python/paddle/jit/dy2static/transformers/loop_transformer.py @Fripping
🙋@MufanColin
#67259
✅G-49 python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py @Fripping
🙋@MufanColin
#67259
✅G-50 python/paddle/jit/sot/opcode_translator/executor/tracker.py @Fripping
🙋@MufanColin
#67261
✅G-51 python/paddle/jit/sot/opcode_translator/executor/variables/base.py @Fripping
🙋@MufanColin
#67261
✅G-52 python/paddle/jit/sot/opcode_translator/executor/variables/basic.py @Fripping
🙋@MufanColin
#67261
✅G-53 python/paddle/jit/sot/opcode_translator/executor/variables/callable.py @Fripping
🙋@MufanColin
#67261
✅G-54 python/paddle/jit/sot/symbolic/export.py @Fripping
🙋@MufanColin
#67261
✅G-55 python/paddle/jit/sot/utils/magic_methods.py @Fripping
🙋@MufanColin
#67261
✅G-56 python/paddle/nn/decode.py @Fripping
🙋@MufanColin
#67261
✅G-57 python/paddle/nn/functional/common.py @Fripping
🙋@MufanColin
#67261
✅G-58 python/paddle/nn/functional/conv.py @Fripping
🙋@MufanColin
#67261
✅G-59 python/paddle/nn/functional/loss.py @Fripping
🙋@MufanColin
#67282
✅G-60 python/paddle/nn/functional/pooling.py @Fripping
🙋@MufanColin
#67282
✅G-61 python/paddle/nn/layer/conv.py @Fripping
🙋@MufanColin
#67282
✅G-62 python/paddle/nn/layer/loss.py @Fripping
🙋@MufanColin
#67282
✅G-63 python/paddle/nn/layer/rnn.py @Fripping
🙋@MufanColin
#67282
✅G-64 python/paddle/optimizer/asgd.py @Fripping
🙋@MufanColin
#67282
✅G-65 python/paddle/quantization/imperative/qat.py @Fripping
🙋@MufanColin
#67282
✅G-66 python/paddle/sparse/nn/layer/conv.py @Fripping
🙋@MufanColin
#67282
✅G-67 python/paddle/static/input.py @Fripping
🙋@MufanColin
#67282
✅G-68 python/paddle/static/nn/common.py @Fripping
🙋@MufanColin
#67333
✅G-69 python/paddle/static/nn/control_flow.py @Fripping
🙋@MufanColin
#67333
✅G-70 python/paddle/static/quantization/adaround.py @Fripping
🙋@MufanColin
#67333
✅G-71 python/paddle/tensor/einsum.py @Fripping
🙋@MufanColin
#67333
✅G-72 python/paddle/tensor/manipulation.py @Fripping
🙋@MufanColin
#67333
✅G-73 python/paddle/tensor/math.py @Fripping
🙋@MufanColin
#67333
✅G-74 python/paddle/text/datasets/imikolov.py @Fripping
🙋@MufanColin
#67333
✅G-75 python/paddle/text/datasets/wmt14.py @Fripping
🙋@MufanColin
#67333
✅G-76 python/paddle/text/datasets/wmt16.py @Fripping
🙋@MufanColin
#67333
✅G-77 python/paddle/utils/cpp_extension/cpp_extension.py @Fripping
🙋@MufanColin
#67338
✅G-78 python/paddle/utils/cpp_extension/extension_utils.py @Fripping
🙋@MufanColin
#67338
✅G-79 python/paddle/vision/ops.py @Fripping
🙋@MufanColin
#67338
✅G-80 setup.py @Fripping
🙋@MufanColin
#67338
✅G-81 test/auto_parallel/test_amp_o2_pass.py @Fripping
@MufanColin
#67346
#67338
✅G-82 test/auto_parallel/test_auto_parallel_relaunch.py @Fripping
@MufanColin
#67346
#67338
✅G-83 test/auto_parallel/test_auto_tuner.py @Fripping
@MufanColin
#67346
#67338
✅G-84 test/auto_parallel/test_auto_tuner_compare.py @Fripping
@MufanColin
#67346
#67338
✅G-85 test/auto_parallel/test_converter.py @Fripping
@MufanColin
#67346
#67338
✅G-86 test/auto_parallel/test_engine_api.py @Fripping
@MufanColin
#67346
#67338
✅G-87 test/auto_parallel/test_engine_api_dp.py @MufanColin #67346
✅G-88 test/auto_parallel/test_gpt_with_pir.py @MufanColin #67346
✅G-89 test/auto_parallel/test_gpt_with_prim.py @MufanColin #67346
✅G-90 test/auto_parallel/test_high_order_grad.py @MufanColin #67346
✅G-91 test/auto_parallel/test_iterable_dataset.py @MufanColin #67323
✅G-92 test/auto_parallel/test_mp_allreduce_matmul_grad_overlapping.py @MufanColin #67323
✅G-93 test/auto_parallel/test_optimization_tuner_api.py @MufanColin #67323
✅G-94 test/auto_parallel/test_pass_1F1B.py @MufanColin #67323
✅G-95 test/auto_parallel/test_pass_amp.py @MufanColin #67323
✅G-96 test/auto_parallel/test_pass_generation_pipeline.py @MufanColin #67323
✅G-97 test/auto_parallel/test_pass_grad_clip.py @MufanColin #67323
✅G-98 test/auto_parallel/test_pass_gradient_merge.py @MufanColin #67323
✅G-99 test/auto_parallel/test_pass_quantization.py @MufanColin #67323
✅G-100 test/auto_parallel/test_pass_recompute.py @MufanColin #67323
✅G-101 test/auto_parallel/test_pass_sharding.py @MufanColin #67322
✅G-102 test/auto_parallel/test_pipeline_scheduler.py @MufanColin #67322
✅G-103 test/auto_parallel/test_pipeline_scheduler_vpp.py @MufanColin #67322
✅G-104 test/auto_parallel/test_pipeline_scheduler_zb.py @MufanColin #67322
✅G-105 test/auto_parallel/test_random_ctrl.py @MufanColin #67322
✅G-106 test/auto_parallel/test_relaunch_with_gpt_planner.py @MufanColin #67322
✅G-107 test/auto_parallel/test_relaunch_with_planner.py @MufanColin #67322
✅G-108 test/auto_parallel/test_sharding_with_newexe.py @MufanColin #67322
✅G-109 test/collective/fleet/pipeline_mnist.py @MufanColin #67322
✅G-110 test/collective/fleet/pipeline_mnist_multi_device.py @MufanColin #67322
✅G-111 test/collective/fleet/pipeline_mnist_one_device.py @MufanColin #67209
✅G-112 test/contrib/test_image_classification_fp16.py @MufanColin #67209
✅G-113 test/contrib/test_multi_precision_fp16_train.py @MufanColin #67209
✅G-114 test/cpp_extension/mix_relu_and_extension_setup.py @MufanColin #67209
✅G-115 test/deprecated/book/test_image_classification_deprecated.py @MufanColin #67209
✅G-116 test/deprecated/custom_op/custom_raw_op_kernel_op_setup.py @MufanColin #67209
✅G-117 test/deprecated/legacy_test/test_argsort_op_deprecated.py @MufanColin #67209
✅G-118 test/deprecated/legacy_test/test_auto_parallel_reshard.py @MufanColin #67209
✅G-119 test/deprecated/legacy_test/test_conv2d_layer_deprecated.py @MufanColin #67209
✅G-120 test/deprecated/legacy_test/test_conv2d_transpose_layer_deprecated.py @MufanColin #67209
✅G-121 test/deprecated/legacy_test/test_conv3d_layer_deprecated.py @crazyxiaoxi #67162
✅G-122 test/deprecated/legacy_test/test_dataset_dataloader_deprecated.py @crazyxiaoxi #67162
✅G-123 test/deprecated/legacy_test/test_decoupled_py_reader_data_check_deprecated.py @crazyxiaoxi #67162
✅G-124 test/deprecated/legacy_test/test_deform_conv2d_deprecated.py @crazyxiaoxi #67162
✅G-125 test/deprecated/legacy_test/test_desc_clone_deprecated.py @crazyxiaoxi #67162
✅G-126 test/deprecated/legacy_test/test_dist_fleet_heter_program_deprecated.py @crazyxiaoxi #67198
✅G-127 test/deprecated/legacy_test/test_dist_tree_index.py @crazyxiaoxi #67198
✅G-128 test/deprecated/legacy_test/test_eager_deletion_delete_vars_deprecated.py @crazyxiaoxi #67198
✅G-129 test/deprecated/legacy_test/test_functional_conv2d_deprecated.py @crazyxiaoxi #67198
✅G-130 test/deprecated/legacy_test/test_functional_conv2d_transpose_deprecated.py @crazyxiaoxi #67198
✅G-131 test/deprecated/legacy_test/test_functional_conv3d_deprecated.py @crazyxiaoxi #67200
✅G-132 test/deprecated/legacy_test/test_functional_conv3d_transpose_deprecated.py @crazyxiaoxi #67200
✅G-133 test/deprecated/legacy_test/test_instance_norm_op_deprecated.py @crazyxiaoxi #67200
✅G-134 test/deprecated/legacy_test/test_layers_deprecated.py @crazyxiaoxi #67200
✅G-135 test/deprecated/legacy_test/test_lazy_init.py @crazyxiaoxi #67200
✅G-136 test/deprecated/legacy_test/test_lookup_table_v2_bf16_op_deprecated.py @crazyxiaoxi #67200
✅G-137 test/deprecated/legacy_test/test_memory_reuse_exclude_feed_var_deprecated.py @crazyxiaoxi #67200
✅G-138 test/deprecated/legacy_test/test_metrics_deprecated.py @crazyxiaoxi #67200
✅G-139 test/deprecated/legacy_test/test_reader_reset.py @crazyxiaoxi #67200
✅G-140 test/deprecated/legacy_test/test_save_load_deprecated.py @crazyxiaoxi #67200
✅G-141 test/deprecated/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py @crazyxiaoxi #67205
✅G-142 test/deprecated/legacy_test/test_signal.py @crazyxiaoxi #67205
✅G-143 test/deprecated/legacy_test/test_slice_op.py @crazyxiaoxi #67205
✅G-144 test/deprecated/legacy_test/test_split_program_deprecated.py @crazyxiaoxi #67205
✅G-145 test/deprecated/legacy_test/test_tensor_array_to_tensor_deprecated.py @crazyxiaoxi #67205
✅G-146 test/deprecated/legacy_test/test_weight_normalization_deprecated.py @crazyxiaoxi #67205
✅G-147 test/deprecated/legacy_test/test_where_op.py @crazyxiaoxi #67205
✅G-148 test/deprecated/quantization/test_moving_average_abs_max_scale_op_deprecated.py @crazyxiaoxi #67205
✅G-149 test/distributed_passes/dist_pass_test_base.py @crazyxiaoxi #67205
✅G-150 test/distributed_passes/model_zoo.py @crazyxiaoxi #67205
✅G-151 test/distributed_passes/test_dist_fuse_adam_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-152 test/distributed_passes/test_dist_fuse_bn_act_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-153 test/distributed_passes/test_dist_fuse_bn_add_act_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-154 test/distributed_passes/test_dist_fuse_momentum_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-155 test/distributed_passes/test_dist_fuse_relu_depthwise_conv_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-156 test/distributed_passes/test_dist_fuse_resunit_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-157 test/distributed_passes/test_dist_fuse_sgd_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-158 test/distributed_passes/test_dist_inplace_addto_pass.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-159 test/distribution/test_distribution_beta.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-160 test/distribution/test_distribution_chi2.py 🙋@haoyu2022
@Wizard-ZP
#67340
✅G-161 test/distribution/test_distribution_chi2_static.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-162 test/distribution/test_distribution_exponential.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-163 test/distribution/test_distribution_exponential_static.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-164 test/distribution/test_distribution_gamma.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-165 test/distribution/test_distribution_gamma_static.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-166 test/distribution/test_distribution_geometric.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-167 test/distribution/test_distribution_lkj_cholesky.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-168 test/distribution/test_distribution_lkj_cholesky_static.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-169 test/dygraph_to_static/bert_utils.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-170 test/dygraph_to_static/seq2seq_dygraph_model.py 🙋@haoyu2022
@Wizard-ZP
#67344
✅G-171 test/dygraph_to_static/simnet_dygraph_model.py @Wizard-ZP #67492
✅G-172 test/dygraph_to_static/test_cycle_gan.py @Wizard-ZP #67492
✅G-173 test/dygraph_to_static/test_set_static_op_arg_pre_cast_hook.py @Wizard-ZP #67492
✅G-174 test/dygraph_to_static/test_tsm.py @Wizard-ZP #67492
✅G-175 test/dygraph_to_static/transformer_dygraph_model.py @Wizard-ZP #67492
✅G-176 test/ir/inference/test_mkldnn_cpu_bfloat16_pass.py @Wizard-ZP #67492
✅G-177 test/ir/inference/test_mkldnn_matmul_op_output_fuse_pass.py @Wizard-ZP #67492
✅G-178 test/ir/inference/test_reshape2_matmul_fuse_pass.py @Wizard-ZP #67492
✅G-179 test/ir/inference/test_trt_convert_deformable_conv.py @Wizard-ZP #67492
✅G-180 test/ir/inference/test_trt_skip_layernorm_fuse_pass.py @Wizard-ZP #67492
✅G-181 test/ir/pir/fused_pass/onednn/test_operator_unsqueeze_onednn_fuse_pass.py @Jeff114514 #67141
✅G-182 test/legacy_test/ctr_dataset_reader.py @Jeff114514 #67141
✅G-183 test/legacy_test/dist_allreduce_op.py @Jeff114514 #67141
✅G-184 test/legacy_test/dist_fleet_raw_program_optimizer.py @Jeff114514 #67141
✅G-185 test/legacy_test/dist_fleet_raw_program_optimizer_fuse_allreduce.py @Jeff114514 #67141
✅G-186 test/legacy_test/dist_mnist.py @Jeff114514 #67141
✅G-187 test/legacy_test/dist_mnist_dgc.py @Jeff114514 #67141
✅G-188 test/legacy_test/nets.py @Jeff114514 #67141
✅G-189 test/legacy_test/seresnext_net.py @Jeff114514 #67141
✅G-190 test/legacy_test/simple_nets.py @Jeff114514 #67141
✅G-191 test/legacy_test/test_asgd_op.py @Jeff114514 #67145
✅G-192 test/legacy_test/test_attn_bias.py @Jeff114514 #67145
✅G-193 test/legacy_test/test_cholesky_op.py @Jeff114514 #67145
✅G-194 test/legacy_test/test_conv1d_layer.py @Jeff114514 #67145
✅G-195 test/legacy_test/test_conv1d_transpose_layer.py @Jeff114514 #67145
✅G-196 test/legacy_test/test_conv2d_layer.py @Jeff114514 #67145
✅G-197 test/legacy_test/test_conv2d_transpose_layer.py @Jeff114514 #67145
✅G-198 test/legacy_test/test_conv3d_layer.py @Jeff114514 #67145
✅G-199 test/legacy_test/test_conv3d_transpose_layer.py @Jeff114514 #67145
✅G-200 test/legacy_test/test_conv_transpose_nn_grad.py @Jeff114514 #67145
✅G-201 test/legacy_test/test_crf_decoding_op.py @tlxd #67122
✅G-202 test/legacy_test/test_cross_entropy_op.py @tlxd #67122
✅G-203 test/legacy_test/test_dataset_consistency_inspection.py @tlxd #67122
✅G-204 test/legacy_test/test_deform_conv2d.py @tlxd #67122
✅G-205 test/legacy_test/test_detection.py @tlxd #67122
✅G-206 test/legacy_test/test_distribute_fpn_proposals_op.py @tlxd #67122
✅G-207 test/legacy_test/test_dygraph_spectral_norm.py @tlxd #67122
✅G-208 test/legacy_test/test_dygraph_weight_norm.py @tlxd #67122
✅G-209 test/legacy_test/test_eigh_op.py @tlxd #67130
✅G-210 test/legacy_test/test_eigvalsh_op.py @tlxd #67130
✅G-211 test/legacy_test/test_embedding_deterministic.py @tlxd #67130
✅G-212 test/legacy_test/test_fake_quantize_op.py @tlxd #67130
✅G-213 test/legacy_test/test_flash_attention.py @tlxd #67130
✅G-214 test/legacy_test/test_fleet_executor.py @tlxd #67130
✅G-215 test/legacy_test/test_fleet_executor_origin_scheduler.py @tlxd #67130
✅G-216 test/legacy_test/test_fleet_executor_with_task_nodes.py @tlxd #67130
✅G-217 test/legacy_test/test_frame_op.py @tlxd #67139
✅G-218 test/legacy_test/test_functional_conv2d.py @tlxd #67139
✅G-219 test/legacy_test/test_functional_conv3d.py @tlxd #67139
✅G-220 test/legacy_test/test_functional_conv3d_transpose.py @tlxd #67139
✅G-221 test/legacy_test/test_fused_attention_no_dropout.py @tlxd #67139
✅G-222 test/legacy_test/test_graph_send_ue_recv_op.py @tlxd #67139
✅G-223 test/legacy_test/test_group_norm_op.py @tlxd #67139
✅G-224 test/legacy_test/test_householder_product.py @tlxd #67139
✅G-225 test/legacy_test/test_imperative_named_members.py @tlxd #67153
✅G-226 test/legacy_test/test_imperative_ocr_attention_model.py @tlxd #67153
✅G-227 test/legacy_test/test_index_add_op.py @tlxd #67153
✅G-228 test/legacy_test/test_index_select_op.py @tlxd #67153
✅G-229 test/legacy_test/test_layers.py @tlxd #67153
✅G-230 test/legacy_test/test_lu_op.py @tlxd #67153
✅G-231 test/legacy_test/test_lu_unpack_op.py @tlxd #67153
✅G-232 test/legacy_test/test_matmul_op_with_head.py @tlxd #67153
✅G-233 test/legacy_test/test_metrics.py @tlxd #67187
✅G-234 test/legacy_test/test_ormqr.py @tlxd #67187
✅G-235 test/legacy_test/test_overlap_add_op.py @tlxd #67187
✅G-236 test/legacy_test/test_pca_lowrank.py @tlxd #67187
✅G-237 test/legacy_test/test_repeat_interleave_op.py @tlxd #67187
✅G-238 test/legacy_test/test_scatter_nd_op.py @tlxd #67187
✅G-239 test/legacy_test/test_sgd_op_bf16.py @tlxd #67187
✅G-240 test/legacy_test/test_sparse_pca_lowrank.py @tlxd #67187
✅G-241 test/legacy_test/test_sparse_softmax_op.py @tlxd #67191
✅G-242 test/legacy_test/test_stft_op.py @tlxd #67191
✅G-243 test/legacy_test/test_svd_lowrank.py @tlxd #67191
✅G-244 test/legacy_test/test_swiglu.py @tlxd #67191
✅G-245 test/legacy_test/test_viterbi_decode_op.py @tlxd #67191
✅G-246 test/legacy_test/test_zero_dim_sundry_static_api_part1.py @tlxd #67191
✅G-247 test/legacy_test/test_zero_dim_sundry_static_api_part2.py @tlxd #67191
✅G-248 test/prim/model/bert.py @tlxd #67191
✅G-249 test/ps/dataset_generator_B.py @tlxd #67194
✅G-250 test/ps/ps_dnn_model.py @tlxd #67194
✅G-251 test/ps/ps_dnn_trainer.py @tlxd #67194
✅G-252 test/sequence/test_sequence_conv.py @tlxd #67194
✅G-253 test/sequence/test_sequence_mask.py @tlxd #67194
✅G-254 test/tokenizer/bert_tokenizer.py @tlxd #67194
✅G-255 test/tokenizer/tokenizer_utils.py @tlxd #67194
✅G-256 test/xpu/test_index_select_op_xpu.py @tlxd #67194
✅G-257 test/xpu/test_repeat_interleave_op_xpu.py @Jeff114514 #67137
✅G-258 test/xpu/test_scatter_nd_add_op_xpu.py @Jeff114514 #67137
✅G-259 test/xpu/test_sequence_conv_op_xpu.py @Jeff114514 #67137
✅G-260 test/xpu/test_sigmoid_cross_entropy_with_logits_op_xpu.py @Jeff114514 #67137
✅G-261 test/xpu/test_swiglu_op_xpu.py @Jeff114514 #67137
✅G-262 tools/count_api_without_core_ops.py @Jeff114514 #67137

RUF013 🎉

序号 文件 认领人 Github id PR 链接
✅H-1 python/paddle/audio/datasets/dataset.py @Jeff114514 #67166
✅H-2 python/paddle/decomposition/recompute.py @Jeff114514 #67166
✅H-3 python/paddle/distributed/auto_parallel/api.py @Jeff114514 #67166
✅H-4 python/paddle/distributed/auto_parallel/static/engine.py @Jeff114514 #67166
✅H-5 python/paddle/distributed/communication/gather.py @Jeff114514 #67166
✅H-6 python/paddle/distributed/fleet/elastic/manager.py @Jeff114514 #67166
✅H-7 python/paddle/nn/functional/input.py @Jeff114514 #67166
✅H-8 python/paddle/tensor/random.py @Jeff114514 #67166
✅H-9 python/paddle/vision/transforms/transforms.py @Jeff114514 #67166
✅H-10 test/ir/inference/program_config.py @Jeff114514 #67166

RUF019 🎉

序号 文件 认领人 Github id PR 链接
✅K-1 paddle/fluid/operators/generator/generate_op.py @Jeff114514 #67184
✅K-2 paddle/fluid/pir/dialect/op_generator/op_gen.py @Jeff114514 #67184
✅K-3 python/paddle/base/executor.py @Jeff114514 #67184
✅K-4 python/paddle/distributed/auto_parallel/static/utils.py @Jeff114514 #67184
✅K-5 python/paddle/distributed/fleet/base/runtime_factory.py @Jeff114514 #67184
✅K-6 python/paddle/distributed/launch/main.py @Jeff114514 #67184
✅K-7 python/paddle/distributed/ps/utils/ps_factory.py @Jeff114514 #67184
✅K-8 python/paddle/static/quantization/quanter.py @Jeff114514 #67184
✅K-9 python/paddle/static/quantization/quantization_pass.py @Jeff114514 #67184
✅K-10 test/legacy_test/op_test.py @Jeff114514 #67184
✅K-11 test/xpu/op_test_xpu.py @Jeff114514 #67185

任务认领方式

⭐️ 提交PR 模版 ⭐️:

  • // ------- PR 标题 --------
[CodeStyle][Ruff][A-1] Fix ruff `Q003` diagnostic in `python/paddle/distribution/beta.py`

或者多个任务:

[CodeStyle][Ruff][A-1,A-2,A-3] Fix ruff `Q003` diagnostic for 3 files in `python/paddle/`
[CodeStyle][Ruff][A-[1-3]] Fix ruff `Q003` diagnostic for 3 files in `python/paddle/`

Note

北航同学请注意在任务标题中添加 [BUAA],如:

[CodeStyle][Ruff][BUAA][A-1] Fix ruff `Q003` diagnostic in `python/paddle/distribution/beta.py`
[CodeStyle][Ruff][BUAA][A-1,A-2,A-3] Fix ruff `Q003` diagnostic for 3 files in `python/paddle/`

⭐️ 认领方式 ⭐️:
请大家以 comment 的形式认领任务,如:

【报名】:A-1、A-3、A-[48-52]

Warning

单个 PR 提交禁止修改超过 10 个文件, 否则会被 reviewer close。

提交 PR 模版
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE -->
<!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 -->

### PR Category
<!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | Distributed Strategy | Parameter Server | Communication Library | Auto Parallel | Inference | Environment Adaptation ] -->

User Experience

### PR Types
<!-- One of [ New features | Bug fixes | Improvements | Performance | BC Breaking | Deprecations | Docs | Devs | Not User Facing | Security | Deprecations | Others ] -->

Devs

### Description
<!-- Describe what you’ve done -->

修复如下文件中 Ruff 检测出的 `Q003` 问题:

- xxx.py
- xxx.py

### Related links

- #67116

@gouzil

状态介绍
✅:已经完全迁移,所有单测都OK!
🙋: 报名
🟢:审核完毕待合入,合入之后完成!
🔵:可认领!
🟡:当前阶段不需要人力继续跟进,下阶段推进
🚧:迁移中,单测还没有过,还没有审核完。

大致正常流程为:
🔵 -> 🙋 -> 🚧 -> 🟢 -> ✅

异常流程为:
🔵 -> 🙋 -> 🚧 -> 🟡

看板信息

任务数量 🔵可认领 🚧迁移中 🟢待合入 ✅完成 🟡下阶段推进 🏁完成率
409 0 0 0 409 0 100.0%

排名不分先后 @Marcusryz(25) @gouzil(14) @MufanColin(99) @Jeff114514(85) @Whsjrczr(35) @Fripping(46) @crazyxiaoxi(30) @Wizard-ZP(30) @tlxd(56)

@Marcusryz
Copy link
Contributor

【报名】:A-[11-40]

@MufanColin
Copy link
Contributor

【报名】:G-[1-120]

@Marcusryz
Copy link
Contributor

【报名】:A-[1-34]

@crazyxiaoxi
Copy link
Contributor

crazyxiaoxi commented Aug 7, 2024

【报名】:G-[121-150]

@tlxd
Copy link
Contributor

tlxd commented Aug 7, 2024

【报名】:G-[201-256]

@MufanColin
Copy link
Contributor

【报名】:B-[1-6]

@MufanColin
Copy link
Contributor

【报名】:D-[1-13]

@Whsjrczr
Copy link
Contributor

Whsjrczr commented Aug 7, 2024

【报名】:F-[1-35]

@Jeff114514
Copy link
Contributor

Jeff114514 commented Aug 7, 2024

【报名】:C-[1-37], E-1, G-[181-200], G-[257-262], H-[1-10], K-[1-11]

@Fripping
Copy link
Contributor

Fripping commented Aug 7, 2024

【报名】:G-[1-86]

@SigureMo
Copy link
Member

[CodeStyle][Ruff] Ruff 新 rule 引入计划(第二期) #67116 已全部完成,感谢参与的小伙伴们!

@Marcusryz(25) @gouzil(14) @MufanColin(99) @Jeff114514(85) @Whsjrczr(35) @Fripping(46) @crazyxiaoxi(30) @Wizard-ZP(30) @tlxd(56)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭 type/others 其他问题
Projects
Development

No branches or pull requests