From 330a15096bf39fd979938b90aeb3b27f1e82c5e8 Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Mon, 25 Sep 2023 17:44:59 +0800 Subject: [PATCH 1/2] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 088841222c7d0..dc8c82928d1b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,7 +113,6 @@ ignore = [ "B009", "B016", "B019", # Confirmation required - "C411", "C416", "F821", "PLC0414", From 8d3362ae1d1e0df8abac7935163c5de6b295c189 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Tue, 26 Sep 2023 13:13:05 +0000 Subject: [PATCH 2/2] fix bug --- python/paddle/base/backward.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/base/backward.py b/python/paddle/base/backward.py index 2bc6f4fd13dcf..aab6ca0313303 100755 --- a/python/paddle/base/backward.py +++ b/python/paddle/base/backward.py @@ -760,7 +760,7 @@ def _op_can_be_removed_(op_desc, no_grad_set): ] = grad_op_id_to_fwd_op[op_desc.original_id()] to_insert.append((new_op_desc, idx)) - list([op_descs.insert(p[1], p[0]) for p in reversed(to_insert)]) + [op_descs.insert(p[1], p[0]) for p in reversed(to_insert)] return op_descs