From 7216d9bf5f9c751c617aaf4b651e888f8e4bbe20 Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Mon, 12 Dec 2022 14:44:30 +0800 Subject: [PATCH] [CodeStyle][isort][F401] fix some regression issues (#48936) * [CodeStyle][isort][F401] fix some regression issues * add import paddle to fix eval call --- .../distributed/auto_parallel/tuner/rule_based_tuner.py | 2 +- python/paddle/fluid/tests/unittests/test_device_guard.py | 1 - .../paddle/fluid/tests/unittests/xpu/test_device_guard_xpu.py | 1 - python/paddle/utils/inplace_utils.py | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/python/paddle/distributed/auto_parallel/tuner/rule_based_tuner.py b/python/paddle/distributed/auto_parallel/tuner/rule_based_tuner.py index 1e94adc8de0..f1508f793a9 100644 --- a/python/paddle/distributed/auto_parallel/tuner/rule_based_tuner.py +++ b/python/paddle/distributed/auto_parallel/tuner/rule_based_tuner.py @@ -13,8 +13,8 @@ # limitations under the License. import math - from abc import abstractmethod + from ..graph import Graph _PATTERNS = {} diff --git a/python/paddle/fluid/tests/unittests/test_device_guard.py b/python/paddle/fluid/tests/unittests/test_device_guard.py index 13122c2794e..7fd596f59fe 100644 --- a/python/paddle/fluid/tests/unittests/test_device_guard.py +++ b/python/paddle/fluid/tests/unittests/test_device_guard.py @@ -16,7 +16,6 @@ import unittest import warnings import paddle -import paddle.fluid as fluid import paddle.fluid.core as core paddle.enable_static() diff --git a/python/paddle/fluid/tests/unittests/xpu/test_device_guard_xpu.py b/python/paddle/fluid/tests/unittests/xpu/test_device_guard_xpu.py index 081074dcab8..903c1115b08 100644 --- a/python/paddle/fluid/tests/unittests/xpu/test_device_guard_xpu.py +++ b/python/paddle/fluid/tests/unittests/xpu/test_device_guard_xpu.py @@ -20,7 +20,6 @@ sys.path.append("..") import warnings import paddle -import paddle.fluid as fluid import paddle.fluid.core as core paddle.enable_static() diff --git a/python/paddle/utils/inplace_utils.py b/python/paddle/utils/inplace_utils.py index 2ee809facab..48a40847708 100644 --- a/python/paddle/utils/inplace_utils.py +++ b/python/paddle/utils/inplace_utils.py @@ -13,8 +13,8 @@ # limitations under the License. import warnings -import paddle -from paddle import _C_ops, _legacy_C_ops + +import paddle # noqa: F401 from paddle.fluid.framework import _non_static_mode from paddle.fluid.wrapped_decorator import wrap_decorator -- GitLab