未验证 提交 f8830754 编写于 作者: S Shuangchi He 提交者: GitHub

[CodeStyle][F401] remove unused imports in unittests/fft_ps_rnn. (#46707)

上级 05da9bf4
......@@ -16,7 +16,7 @@ import enum
import numpy as np
from functools import partial
from numpy import asarray
from numpy.fft._pocketfft import _raw_fft, _raw_fftnd, _get_forward_norm, _get_backward_norm, _cook_nd_args
from numpy.fft._pocketfft import _cook_nd_args, _raw_fft, _raw_fftnd
class NormMode(enum.Enum):
......
......@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import contextlib
import re
import sys
import unittest
......
......@@ -13,8 +13,6 @@
# limitations under the License.
import contextlib
import re
import sys
import unittest
import numpy as np
......
......@@ -12,20 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
import numpy as np
import paddle
import re
import sys
from spectral_op_np import fft_c2c, fft_r2c, fft_c2r, fft_c2c_backward, fft_r2c_backward, fft_c2r_backward
import paddle.fluid.core as core
import paddle.fluid.dygraph as dg
import paddle.static as static
from numpy.random import random as rand
from paddle.fluid import Program, program_guard
from paddle import _C_ops, _legacy_C_ops
from paddle import _C_ops
sys.path.append("../")
from op_test import OpTest
......
......@@ -13,11 +13,8 @@
# limitations under the License.
import os
import unittest
import numpy as np
import time
import paddle
from paddle.distributed.ps.utils.public import ps_log_root_dir, debug_program
import paddle.distributed.fleet as fleet
import paddle.fluid as fluid
......
......@@ -16,12 +16,10 @@ import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.ps.utils.ps_program_builder import *
import paddle.distributed.fleet as fleet
import argparse
import time
import sys
import yaml, six, copy
import paddle
import os
import warnings
import ast
import numpy as np
import struct
......
......@@ -15,15 +15,14 @@
# limitations under the License.
import unittest
import shlex
from paddle.fluid.tests.unittests.distributed_passes.dist_pass_test_base import prepare_python_path_and_return_module, remove_path_if_exists
import shlex # noqa: F401
from paddle.fluid.tests.unittests.distributed_passes.dist_pass_test_base import remove_path_if_exists # noqa: F401
import os
class FlPsTest(unittest.TestCase):
def test_launch_fl_ps(self):
pass
'''
cmd = [
'python', '-m', 'paddle.distributed.fleet.launch', '--log_dir',
......@@ -36,6 +35,7 @@ class FlPsTest(unittest.TestCase):
prepare_python_path_and_return_module(__file__)
exitcode = os.system(' '.join(cmd))
'''
pass
if __name__ == '__main__':
......
......@@ -12,19 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import unittest
import numpy as np
import paddle
import paddle.fluid as fluid
import paddle
from paddle.fluid.tests.unittests.distributed_passes.ps_pass_test_base import *
from paddle.distributed.ps.utils.public import logger, ps_log_root_dir
from ps_dnn_trainer import DnnTrainer
import paddle.distributed.fleet.proto.the_one_ps_pb2 as ps_pb2
from google.protobuf import text_format
import paddle.distributed.fleet.proto.the_one_ps_pb2 as ps_pb2 # noqa: F401
from google.protobuf import text_format # noqa: F401
class TestTheOnePs(PsPassTestBase):
......@@ -36,7 +29,6 @@ class TestTheOnePs(PsPassTestBase):
pass
def check(self, file1, file2):
pass
'''
f = open(file1, "rb")
ps_desc_1 = ps_pb2.PSParameter()
......@@ -56,6 +48,7 @@ class TestTheOnePs(PsPassTestBase):
else:
return False
'''
pass
def test_ps_cpu_async(self):
self.init()
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import paddle
import numpy as np
def convert_params_for_cell(np_cell, paddle_cell):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册