未验证 提交 ebc3f43d 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle][F401] remove unused import in unittests/test_[a-e] (#46691)

上级 c1efbdd4
...@@ -17,7 +17,7 @@ import numpy as np ...@@ -17,7 +17,7 @@ import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
class TestAccuracyOp(OpTest): class TestAccuracyOp(OpTest):
......
...@@ -21,7 +21,6 @@ import paddle.fluid.layers as layers ...@@ -21,7 +21,6 @@ import paddle.fluid.layers as layers
import paddle.fluid.core as core import paddle.fluid.core as core
import gradient_checker import gradient_checker
import paddle.nn.functional as F import paddle.nn.functional as F
from paddle.fluid.framework import _test_eager_guard
from decorator_helper import prog_scope from decorator_helper import prog_scope
......
...@@ -17,13 +17,12 @@ import unittest ...@@ -17,13 +17,12 @@ import unittest
import numpy as np import numpy as np
from scipy.special import expit, erf from scipy.special import expit, erf
from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci from op_test import OpTest, convert_float_to_uint16
import paddle import paddle
import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator from paddle.fluid.op import Operator
from op_test import OpTest
import paddle import paddle
......
...@@ -13,12 +13,7 @@ ...@@ -13,12 +13,7 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
import paddle import paddle
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from op_test import OpTest
import math
class TestAdagradOpV2(unittest.TestCase): class TestAdagradOpV2(unittest.TestCase):
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
import numpy as np import numpy as np
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -17,7 +17,6 @@ import unittest ...@@ -17,7 +17,6 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -16,10 +16,8 @@ import unittest ...@@ -16,10 +16,8 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
def adaptive_start_index(index, input_size, output_size): def adaptive_start_index(index, input_size, output_size):
......
...@@ -14,9 +14,8 @@ ...@@ -14,9 +14,8 @@
import numpy as np import numpy as np
import unittest import unittest
from op_test import OpTest, check_out_dtype from op_test import check_out_dtype
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -16,10 +16,9 @@ import unittest ...@@ -16,10 +16,9 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest, check_out_dtype from op_test import check_out_dtype
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -16,10 +16,9 @@ import unittest ...@@ -16,10 +16,9 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest, check_out_dtype from op_test import check_out_dtype
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math import math
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -18,7 +18,6 @@ Unit testing for affine_channel_op ...@@ -18,7 +18,6 @@ Unit testing for affine_channel_op
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
import paddle import paddle
import numpy as np import numpy as np
from paddle import fluid, nn from paddle import fluid
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest import unittest
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
import paddle import paddle
from test_collective_base import TestDistBase from test_collective_base import TestDistBase
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest, skip_check_grad_ci from op_test import OpTest
import paddle.fluid as fluid
import paddle.fluid.contrib.mixed_precision.amp_nn as amp_nn import paddle.fluid.contrib.mixed_precision.amp_nn as amp_nn
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
......
...@@ -17,7 +17,6 @@ import unittest ...@@ -17,7 +17,6 @@ import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from test_attribute_var import UnittestBase from test_attribute_var import UnittestBase
......
...@@ -15,12 +15,10 @@ ...@@ -15,12 +15,10 @@
import unittest import unittest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import numpy as np import numpy as np
import six import six
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import ParamAttr
from paddle.fluid.framework import Program, grad_var_name from paddle.fluid.framework import Program, grad_var_name
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward from paddle.fluid.backward import append_backward
......
...@@ -21,7 +21,7 @@ import paddle.fluid.layers as layers ...@@ -21,7 +21,7 @@ import paddle.fluid.layers as layers
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward from paddle.fluid.backward import append_backward
from paddle.fluid.framework import default_main_program from paddle.fluid.framework import default_main_program
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
import numpy as np import numpy as np
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import unittest import unittest
......
...@@ -17,9 +17,8 @@ import numpy as np ...@@ -17,9 +17,8 @@ import numpy as np
import unittest import unittest
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.backward import append_backward from paddle.fluid.backward import append_backward
import paddle.fluid.framework as framework import paddle.fluid.framework as framework
import gradient_checker import gradient_checker
......
...@@ -17,10 +17,6 @@ import numpy as np ...@@ -17,10 +17,6 @@ import numpy as np
import unittest import unittest
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
from paddle.fluid.backward import append_backward
from paddle.distributed.models.moe import utils from paddle.distributed.models.moe import utils
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -17,11 +17,7 @@ import unittest ...@@ -17,11 +17,7 @@ import unittest
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard
paddle.enable_static() paddle.enable_static()
np.random.seed(0) np.random.seed(0)
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import unittest.mock import unittest.mock
from io import StringIO
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -23,14 +22,9 @@ import paddle.nn.functional as F ...@@ -23,14 +22,9 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.tensor as tensor import paddle.tensor as tensor
from paddle.fluid import layers from paddle.fluid import layers
from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.utils import append_distributed_attr_suffix
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.dist_context import set_default_distributed_context
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = None _global_parallel_strategy = None
......
...@@ -13,25 +13,18 @@ ...@@ -13,25 +13,18 @@
# limitations under the License. # limitations under the License.
import collections import collections
import math
import unittest import unittest
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.tensor as tensor import paddle.tensor as tensor
import paddle.utils as utils import paddle.utils as utils
from paddle.fluid import layers from paddle.fluid import layers
from paddle.fluid.framework import _non_static_mode
from paddle.nn.layer.transformer import _convert_param_attr_to_list from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed.fleet import fleet
import paddle.static as static import paddle.static as static
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
paddle.enable_static() paddle.enable_static()
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import copy
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.static as static import paddle.static as static
...@@ -29,7 +28,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer ...@@ -29,7 +28,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.cost_model import estimate_cost from paddle.distributed.auto_parallel.cost_model import estimate_cost
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = "dp_mp_pp" _global_parallel_strategy = "dp_mp_pp"
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
...@@ -16,7 +16,6 @@ import copy ...@@ -16,7 +16,6 @@ import copy
import unittest import unittest
import paddle import paddle
from paddle.fluid import core
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed import fleet from paddle.distributed import fleet
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import os
import json
from paddle.distributed.auto_parallel.graph import Node
from paddle.distributed.auto_parallel.graph import Edge
from paddle.distributed.auto_parallel.graph import Graph from paddle.distributed.auto_parallel.graph import Graph
......
...@@ -16,22 +16,17 @@ import tempfile ...@@ -16,22 +16,17 @@ import tempfile
import unittest import unittest
import os import os
import json import json
import collections
import math
import numpy as np import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.tensor as tensor
import paddle.utils as utils import paddle.utils as utils
import paddle.static as static import paddle.static as static
from paddle.fluid import core from paddle.fluid import core
from paddle.fluid import layers from paddle.fluid import layers
from paddle.fluid.framework import _non_static_mode from paddle.fluid.initializer import NumpyArrayInitializer
from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed import fleet from paddle.distributed import fleet
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
...@@ -40,15 +35,7 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer ...@@ -40,15 +35,7 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.process_group import get_all_process_groups
from paddle.distributed.auto_parallel.process_group import new_process_group
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.cluster import Cluster
from paddle.distributed.auto_parallel.cluster import DeviceType
from paddle.distributed.auto_parallel.cluster import LinkType
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.mapper import build_process_graph
from paddle.distributed.auto_parallel.mapper import build_cluster_graph
from paddle.distributed.auto_parallel.mapper import mapping from paddle.distributed.auto_parallel.mapper import mapping
from paddle.distributed.auto_parallel.mapper import get_dtype_bytes from paddle.distributed.auto_parallel.mapper import get_dtype_bytes
from paddle.distributed.auto_parallel.mapper import get_comm_volume from paddle.distributed.auto_parallel.mapper import get_comm_volume
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import unittest.mock import unittest.mock
from io import StringIO
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -24,12 +22,8 @@ import paddle.nn.functional as F ...@@ -24,12 +22,8 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.tensor as tensor import paddle.tensor as tensor
from paddle.fluid import layers from paddle.fluid import layers
from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.utils import append_distributed_attr_suffix
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed import fleet from paddle.distributed import fleet
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
......
...@@ -13,26 +13,18 @@ ...@@ -13,26 +13,18 @@
# limitations under the License. # limitations under the License.
import collections import collections
import math
import unittest import unittest
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.tensor as tensor import paddle.tensor as tensor
import paddle.utils as utils import paddle.utils as utils
from paddle.fluid import layers from paddle.fluid import layers
from paddle.fluid.framework import _non_static_mode
from paddle.nn.layer.transformer import _convert_param_attr_to_list from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed import fleet
import paddle.static as static import paddle.static as static
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.utils import _get_comm_group from paddle.distributed.auto_parallel.utils import _get_comm_group
......
...@@ -27,7 +27,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer ...@@ -27,7 +27,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.process_group import _g_process_group_map, ProcessGroup from paddle.distributed.auto_parallel.process_group import _g_process_group_map, ProcessGroup
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = None _global_parallel_strategy = None
......
...@@ -26,7 +26,6 @@ from paddle.distributed import fleet ...@@ -26,7 +26,6 @@ from paddle.distributed import fleet
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.cost import CostEstimator from paddle.distributed.auto_parallel.cost import CostEstimator
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.cluster import Cluster
......
...@@ -26,7 +26,6 @@ from paddle.distributed import fleet ...@@ -26,7 +26,6 @@ from paddle.distributed import fleet
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.cost import CostEstimator from paddle.distributed.auto_parallel.cost import CostEstimator
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.cluster import Cluster
......
...@@ -26,9 +26,6 @@ import paddle.utils as utils ...@@ -26,9 +26,6 @@ import paddle.utils as utils
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.dist_context import get_default_distributed_context from paddle.distributed.auto_parallel.dist_context import get_default_distributed_context
from paddle.distributed import fleet from paddle.distributed import fleet
from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.process_group import new_process_group
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = None _global_parallel_strategy = None
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import copy
import json
import unittest import unittest
import paddle import paddle
...@@ -22,13 +19,9 @@ import paddle.nn as nn ...@@ -22,13 +19,9 @@ import paddle.nn as nn
import paddle.static as static import paddle.static as static
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
from paddle.distributed import fleet
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.planner import PlanSpace
from paddle.distributed.auto_parallel.utils import SerialProgramInfo
from paddle.distributed.auto_parallel.planner import PlanSpace, PlanFilter
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.utils import get_all_distributed_main_program
from paddle.distributed.auto_parallel.dist_attribute import TensorDistributedAttribute from paddle.distributed.auto_parallel.dist_attribute import TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.utils import update_op_dims_mapping_by_default_dist_impl from paddle.distributed.auto_parallel.utils import update_op_dims_mapping_by_default_dist_impl
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest import unittest
import copy
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -23,11 +20,8 @@ import paddle.nn.functional as F ...@@ -23,11 +20,8 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import layers from paddle.fluid import layers
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImplContainer
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImpl
from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container
from paddle.distributed.auto_parallel.dist_context import DistributedContext, DistributedOperatorContext from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute, TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_op import DistributedOperator from paddle.distributed.auto_parallel.dist_op import DistributedOperator
paddle.enable_static() paddle.enable_static()
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest import unittest
import copy
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -23,11 +20,8 @@ import paddle.nn.functional as F ...@@ -23,11 +20,8 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import layers from paddle.fluid import layers
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImplContainer
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImpl
from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container
from paddle.distributed.auto_parallel.dist_context import DistributedContext, DistributedOperatorContext from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute, TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_op import DistributedOperator from paddle.distributed.auto_parallel.dist_op import DistributedOperator
paddle.enable_static() paddle.enable_static()
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from decorator_helper import prog_scope
import unittest import unittest
import paddle.fluid as fluid import paddle.fluid as fluid
import numpy as np import numpy as np
......
...@@ -13,15 +13,10 @@ ...@@ -13,15 +13,10 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers import paddle.fluid.layers as layers
import paddle.fluid.core as core
from paddle.fluid.contrib.layers import basic_gru, basic_lstm from paddle.fluid.contrib.layers import basic_gru, basic_lstm
from paddle.fluid.executor import Executor
from paddle.fluid import framework
from test_imperative_base import new_program_scope from test_imperative_base import new_program_scope
import numpy as np
class TestBasicGRUApiName(unittest.TestCase): class TestBasicGRUApiName(unittest.TestCase):
......
...@@ -14,11 +14,8 @@ ...@@ -14,11 +14,8 @@
import unittest import unittest
import numpy as np import numpy as np
import random
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid from op_test import OpTest
from paddle.fluid import Program, program_guard
from op_test import OpTest, skip_check_grad_ci
import paddle.fluid.core as core import paddle.fluid.core as core
......
...@@ -12,14 +12,11 @@ ...@@ -12,14 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest, _set_use_system_allocator from paddle.fluid.framework import _test_eager_guard
from paddle.fluid.framework import grad_var_name, _test_eager_guard
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
import paddle import paddle
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid
from paddle.io import BatchSampler, Dataset, Sampler, SequenceSampler, \ from paddle.io import BatchSampler, Dataset, Sampler, SequenceSampler, \
RandomSampler, WeightedRandomSampler RandomSampler, WeightedRandomSampler
from paddle.io import DistributedBatchSampler
IMAGE_SIZE = 32 IMAGE_SIZE = 32
......
...@@ -16,7 +16,6 @@ import paddle ...@@ -16,7 +16,6 @@ import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import numpy as np import numpy as np
import unittest import unittest
from op_test import OpTest
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import logging from paddle.fluid.op import Operator
from paddle.fluid.op import Operator, DynamicRecurrentOp
import paddle.fluid.core as core import paddle.fluid.core as core
import unittest import unittest
import numpy as np import numpy as np
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import paddle import paddle
from op_test import OpTest from op_test import OpTest
import numpy as np import numpy as np
import os
def output_hist(out): def output_hist(out):
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest, _in_eager_without_dygraph_check from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -18,8 +18,6 @@ import tempfile ...@@ -18,8 +18,6 @@ import tempfile
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
from op_test import OpTest from op_test import OpTest
import paddle.inference as paddle_infer import paddle.inference as paddle_infer
from paddle.fluid.framework import in_dygraph_mode from paddle.fluid.framework import in_dygraph_mode
......
...@@ -17,8 +17,6 @@ import numpy as np ...@@ -17,8 +17,6 @@ import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.tensor as tensor
from paddle.fluid import Program, program_guard
class TestBmmOp(OpTest): class TestBmmOp(OpTest):
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
import copy
def box_clip(input_box, im_info, output_box): def box_clip(input_box, im_info, output_box):
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import numpy as np
import os
import shutil
import paddle.fluid.core as core import paddle.fluid.core as core
import unittest import unittest
from paddle.fluid.layers.nn import _pull_box_sparse from paddle.fluid.layers.nn import _pull_box_sparse
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
import paddle import paddle
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
from test_collective_base import TestDistBase
import random import random
......
...@@ -14,9 +14,8 @@ ...@@ -14,9 +14,8 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
import paddle import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,14 +12,10 @@ ...@@ -12,14 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from re import X
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
np.random.seed(10) np.random.seed(10)
......
...@@ -14,12 +14,10 @@ ...@@ -14,12 +14,10 @@
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.framework import Parameter
import numpy as np import numpy as np
from simple_nets import simple_fc_net from simple_nets import simple_fc_net
import random import random
import unittest import unittest
import os
batch_size = 32 batch_size = 32
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import paddle import paddle
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -13,11 +13,6 @@ ...@@ -13,11 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
from op_test import OpTest
import paddle
import paddle.fluid as fluid
from paddle.framework import core
from paddle.fluid.tests.unittests.c_embedding_op_base import TestCEmbeddingCPU, TestCEmbeddingOpBase, TestCEmbeddingOpFP32 from paddle.fluid.tests.unittests.c_embedding_op_base import TestCEmbeddingCPU, TestCEmbeddingOpBase, TestCEmbeddingOpFP32
TestCEmbeddingCPU() TestCEmbeddingCPU()
......
...@@ -18,7 +18,7 @@ import numpy as np ...@@ -18,7 +18,7 @@ import numpy as np
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
from op_test import OpTest, convert_uint16_to_float, convert_float_to_uint16 from op_test import OpTest, convert_uint16_to_float, convert_float_to_uint16
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
import gradient_checker import gradient_checker
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -13,15 +13,9 @@ ...@@ -13,15 +13,9 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
import paddle.fluid.incubate.fleet.base.role_maker as role_maker
from paddle.fluid.incubate.fleet.collective import CollectiveOptimizer, fleet
from paddle.fluid.incubate.checkpoint.auto_checkpoint import ExeTrainStatus
from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver
import os
import sys
from paddle.distributed.fleet.utils.fs import LocalFS, HDFSClient from paddle.distributed.fleet.utils.fs import HDFSClient
from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver
......
...@@ -128,10 +128,8 @@ class TestCholeskySingularAPI(unittest.TestCase): ...@@ -128,10 +128,8 @@ class TestCholeskySingularAPI(unittest.TestCase):
fetch_list=[result]) fetch_list=[result])
except RuntimeError as ex: except RuntimeError as ex:
print("The mat is singular") print("The mat is singular")
pass
except ValueError as ex: except ValueError as ex:
print("The mat is singular") print("The mat is singular")
pass
def test_static(self): def test_static(self):
for place in self.places: for place in self.places:
...@@ -148,10 +146,8 @@ class TestCholeskySingularAPI(unittest.TestCase): ...@@ -148,10 +146,8 @@ class TestCholeskySingularAPI(unittest.TestCase):
result = paddle.cholesky(input) result = paddle.cholesky(input)
except RuntimeError as ex: except RuntimeError as ex:
print("The mat is singular") print("The mat is singular")
pass
except ValueError as ex: except ValueError as ex:
print("The mat is singular") print("The mat is singular")
pass
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import numpy as np import numpy as np
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from paddle import fluid from paddle import fluid
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math
import random
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math
import sys
from op_test import OpTest from op_test import OpTest
......
...@@ -14,19 +14,14 @@ ...@@ -14,19 +14,14 @@
import numpy as np import numpy as np
import unittest import unittest
import time
import argparse
import os import os
import sys import sys
import subprocess import subprocess
import traceback
import functools
import pickle import pickle
import tempfile import tempfile
from contextlib import closing from contextlib import closing
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.unique_name as nameGen
from paddle.fluid import core from paddle.fluid import core
...@@ -157,7 +152,6 @@ def runtime_main(test_class, col_type): ...@@ -157,7 +152,6 @@ def runtime_main(test_class, col_type):
model.run_trainer(args) model.run_trainer(args)
import paddle.compat as cpt
import socket import socket
from contextlib import closing from contextlib import closing
......
...@@ -15,12 +15,9 @@ ...@@ -15,12 +15,9 @@
import numpy as np import numpy as np
import unittest import unittest
import time import time
import argparse
import os import os
import sys import sys
import subprocess import subprocess
import traceback
import functools
import pickle import pickle
import tempfile import tempfile
from contextlib import closing from contextlib import closing
...@@ -130,7 +127,6 @@ def runtime_main(test_class, col_type, sub_type): ...@@ -130,7 +127,6 @@ def runtime_main(test_class, col_type, sub_type):
model.run_trainer(args) model.run_trainer(args)
import paddle.compat as cpt
import socket import socket
from contextlib import closing from contextlib import closing
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
import os import os
import unittest import unittest
import time import time
import threading
import numpy
import paddle import paddle
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import os import os
import sys import sys
import time import time
import threading
import subprocess import subprocess
import unittest import unittest
import numpy import numpy
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
import os import os
import unittest import unittest
import time import time
import threading
import numpy
import tempfile import tempfile
import paddle import paddle
......
...@@ -17,7 +17,6 @@ import unittest ...@@ -17,7 +17,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
def create_test_not_equal_class(op_type, typename, callback): def create_test_not_equal_class(op_type, typename, callback):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from paddle import fluid, tensor from paddle import fluid
import paddle import paddle
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import numpy as np import numpy as np
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle
from numpy.random import random as rand from numpy.random import random as rand
from paddle import tensor from paddle import tensor
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -16,7 +16,7 @@ import unittest ...@@ -16,7 +16,7 @@ import unittest
import numpy as np import numpy as np
from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16 from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard, core from paddle.fluid import Program, core, program_guard
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
import paddle import paddle
import gradient_checker import gradient_checker
......
...@@ -15,12 +15,10 @@ ...@@ -15,12 +15,10 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid.core as core
import sys import sys
sys.path.append("..") sys.path.append("..")
from op_test import OpTest from op_test import OpTest
from paddle.fluid import Program, program_guard
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.static as static import paddle.static as static
from numpy.random import random as rand from numpy.random import random as rand
......
...@@ -17,7 +17,6 @@ import paddle ...@@ -17,7 +17,6 @@ import paddle
from paddle import fluid, nn from paddle import fluid, nn
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest import unittest
......
...@@ -17,7 +17,6 @@ import paddle ...@@ -17,7 +17,6 @@ import paddle
from paddle import fluid, nn from paddle import fluid, nn
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest import unittest
......
...@@ -20,8 +20,6 @@ import paddle ...@@ -20,8 +20,6 @@ import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest
from paddle.fluid import Program, program_guard
class TestConv2DAPI(unittest.TestCase): class TestConv2DAPI(unittest.TestCase):
......
...@@ -19,9 +19,6 @@ import paddle ...@@ -19,9 +19,6 @@ import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest
from paddle.fluid import Program, program_guard
from test_conv2d_op import TestConv2DOp, TestConv2DOp_v2, create_test_padding_SAME_class, create_test_padding_VALID_class, create_test_channel_last_class, create_test_cudnn_padding_SAME_class, create_test_cudnn_channel_last_class from test_conv2d_op import TestConv2DOp, TestConv2DOp_v2, create_test_padding_SAME_class, create_test_padding_VALID_class, create_test_channel_last_class, create_test_cudnn_padding_SAME_class, create_test_cudnn_channel_last_class
#----------------TestDepthwiseConv ----- #----------------TestDepthwiseConv -----
......
...@@ -18,9 +18,6 @@ import numpy as np ...@@ -18,9 +18,6 @@ import numpy as np
import paddle import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest
from test_conv2d_transpose_op import TestConv2DTransposeOp from test_conv2d_transpose_op import TestConv2DTransposeOp
......
...@@ -19,7 +19,6 @@ import paddle ...@@ -19,7 +19,6 @@ import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest from op_test import OpTest
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest
from test_conv3d_transpose_op import TestConv3DTransposeOp from test_conv3d_transpose_op import TestConv3DTransposeOp
......
...@@ -15,10 +15,7 @@ ...@@ -15,10 +15,7 @@
import paddle.fluid as fluid import paddle.fluid as fluid
import unittest import unittest
import numpy as np import numpy as np
import six
import paddle import paddle
import warnings
import sys
np_minor_version = int((np.__version__).split('.')[1]) np_minor_version = int((np.__version__).split('.')[1])
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -15,9 +15,7 @@ ...@@ -15,9 +15,7 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
np.random.seed(10) np.random.seed(10)
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
import paddle.fluid as fluid import paddle.fluid as fluid
import unittest import unittest
import numpy as np import numpy as np
import six
import paddle import paddle
from paddle.fluid.framework import _test_eager_guard, in_dygraph_mode from paddle.fluid.framework import _test_eager_guard
def numpy_cov(np_arr, rowvar=True, ddof=1, fweights=None, aweights=None): def numpy_cov(np_arr, rowvar=True, ddof=1, fweights=None, aweights=None):
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os, shutil
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -12,12 +12,10 @@ ...@@ -12,12 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os, shutil
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid import ParamAttr, initializer
import paddle import paddle
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
from paddle.fluid.core import CipherUtils from paddle.fluid.core import CipherUtils
from paddle.fluid.core import CipherFactory from paddle.fluid.core import CipherFactory
from paddle.fluid.core import Cipher
import unittest import unittest
......
...@@ -12,11 +12,9 @@ ...@@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
from test_softmax_op import stable_softmax
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
...@@ -89,7 +87,6 @@ class TestCTCAlignOp(OpTest): ...@@ -89,7 +87,6 @@ class TestCTCAlignOp(OpTest):
def test_check_output(self): def test_check_output(self):
self.check_output() self.check_output()
pass
class TestCTCAlignOpCase1(TestCTCAlignOp): class TestCTCAlignOpCase1(TestCTCAlignOp):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import paddle import paddle
import paddle.fluid as fluid
from paddle.device.cuda.graphs import CUDAGraph from paddle.device.cuda.graphs import CUDAGraph
import unittest import unittest
import numpy as np import numpy as np
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import unittest import unittest
import numpy as np
from paddle.device.cuda.graphs import wrap_cuda_graph, is_cuda_graph_supported from paddle.device.cuda.graphs import wrap_cuda_graph, is_cuda_graph_supported
paddle.enable_static() paddle.enable_static()
......
...@@ -16,7 +16,7 @@ import paddle ...@@ -16,7 +16,7 @@ import paddle
import unittest import unittest
from paddle.fluid import core from paddle.fluid import core
from paddle.device.cuda import device_count, memory_allocated, max_memory_allocated from paddle.device.cuda import device_count, memory_allocated, max_memory_allocated
from paddle.fluid.framework import _test_eager_guard, _in_legacy_dygraph from paddle.fluid.framework import _test_eager_guard
class TestMaxMemoryAllocated(unittest.TestCase): class TestMaxMemoryAllocated(unittest.TestCase):
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import paddle import paddle
import unittest import unittest
import numpy as np
from paddle.fluid import core from paddle.fluid import core
from paddle.device.cuda import device_count, memory_allocated from paddle.device.cuda import device_count, memory_allocated
......
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
import paddle import paddle
import unittest import unittest
import numpy as np
from paddle.fluid import core from paddle.fluid import core
from paddle.device.cuda import device_count, memory_reserved from paddle.device.cuda import device_count, memory_reserved
from paddle.fluid.framework import _test_eager_guard, _in_legacy_dygraph from paddle.fluid.framework import _test_eager_guard
class TestMemoryreserved(unittest.TestCase): class TestMemoryreserved(unittest.TestCase):
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import os import os
import unittest import unittest
import paddle.fluid.generator as generator
import time # temp for debug import time # temp for debug
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -19,11 +19,7 @@ from op_test import OpTest ...@@ -19,11 +19,7 @@ from op_test import OpTest
import random import random
import paddle import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard
np.random.seed(0) np.random.seed(0)
......
...@@ -20,7 +20,6 @@ from op_test import OpTest ...@@ -20,7 +20,6 @@ from op_test import OpTest
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
import paddle.inference as paddle_infer import paddle.inference as paddle_infer
import gradient_checker import gradient_checker
from decorator_helper import prog_scope from decorator_helper import prog_scope
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
import paddle import paddle
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
from op_test import OpTest
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import numpy as np import numpy as np
from math import log from math import log
from math import exp
from op_test import OpTest from op_test import OpTest
import unittest import unittest
......
...@@ -10,12 +10,8 @@ ...@@ -10,12 +10,8 @@
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
import paddle
import unittest import unittest
import paddle.distributed.fleet as fleet import paddle.distributed.fleet as fleet
import os
import sys
import platform
class MyMultiSlotDataGenerator(fleet.MultiSlotDataGenerator): class MyMultiSlotDataGenerator(fleet.MultiSlotDataGenerator):
......
...@@ -18,10 +18,7 @@ import numpy as np ...@@ -18,10 +18,7 @@ import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator from paddle.fluid.op import Operator
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import os
from op_test import OpTest from op_test import OpTest
from paddle.fluid.framework import grad_var_name
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -19,7 +19,7 @@ import warnings ...@@ -19,7 +19,7 @@ import warnings
import json import json
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
from paddle.io import Dataset, DataLoader, BatchSampler, SequenceSampler from paddle.io import DataLoader, Dataset
import sys import sys
import os import os
......
...@@ -14,13 +14,11 @@ ...@@ -14,13 +14,11 @@
import sys import sys
import unittest import unittest
import numpy as np
import paddle import paddle
import paddle.vision.transforms as transforms import paddle.vision.transforms as transforms
import paddle.fluid as fluid
from paddle.io import * from paddle.io import *
from paddle.fluid.framework import _test_eager_guard, _in_legacy_dygraph from paddle.fluid.framework import _test_eager_guard
class TestDatasetAbstract(unittest.TestCase): class TestDatasetAbstract(unittest.TestCase):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle
import numpy as np import numpy as np
import unittest import unittest
......
...@@ -20,9 +20,7 @@ import paddle ...@@ -20,9 +20,7 @@ import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.compat as cpt import paddle.compat as cpt
import paddle.fluid.core as core import paddle.fluid.core as core
import numpy as np
import os import os
import shutil
import tempfile import tempfile
import unittest import unittest
......
...@@ -17,13 +17,8 @@ TestCases for Dataset consistency insepection of use_var_list and data_generator ...@@ -17,13 +17,8 @@ TestCases for Dataset consistency insepection of use_var_list and data_generator
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.compat as cpt
import paddle.fluid.core as core
import numpy as np
import random
import math import math
import os import os
import shutil
import tempfile import tempfile
import unittest import unittest
import paddle.fluid.incubate.data_generator as dg import paddle.fluid.incubate.data_generator as dg
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import debugger from paddle.fluid import debugger
from paddle.fluid.framework import Program from paddle.fluid.framework import Program
......
...@@ -15,10 +15,6 @@ ...@@ -15,10 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
from paddle.framework import set_default_dtype, get_default_dtype from paddle.framework import set_default_dtype, get_default_dtype
import paddle
import paddle.fluid as fluid
from paddle.fluid.dygraph import Linear
import paddle.fluid.core as core
class TestDefaultType(unittest.TestCase): class TestDefaultType(unittest.TestCase):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import paddle import paddle
import paddle.nn.functional as F
import paddle.nn.initializer as I import paddle.nn.initializer as I
import numpy as np import numpy as np
import unittest import unittest
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import paddle import paddle
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest from op_test import OpTest
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -16,8 +16,7 @@ import paddle ...@@ -16,8 +16,7 @@ import paddle
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core from op_test import OpTest
from op_test import OpTest, skip_check_grad_ci
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import core
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -17,8 +17,6 @@ import numpy as np ...@@ -17,8 +17,6 @@ import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
from op_test import OpTest
paddle.enable_static() paddle.enable_static()
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math import math
from op_test import OpTest from op_test import OpTest
......
...@@ -16,13 +16,11 @@ import paddle ...@@ -16,13 +16,11 @@ import paddle
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.static import Program, program_guard
import unittest import unittest
import paddle.fluid.core as core
import sys import sys
import warnings import warnings
import paddle.utils.deprecated as deprecated import paddle.utils.deprecated as deprecated
from paddle import _C_ops, _legacy_C_ops from paddle import _legacy_C_ops
LOWEST_WARNING_POSTION = 3 LOWEST_WARNING_POSTION = 3
ERROR_WARNING_POSTION = sys.maxsize ERROR_WARNING_POSTION = sys.maxsize
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math
from op_test import OpTest from op_test import OpTest
......
...@@ -12,20 +12,10 @@ ...@@ -12,20 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import numpy as np
import argparse
import time
import math
import sys
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.profiler as profiler
from paddle.fluid import core from paddle.fluid import core
import unittest import unittest
from multiprocessing import Process
import os
import signal
import six import six
import collections import collections
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
import unittest import unittest
import numpy as np import numpy as np
import six import six
import sys
import collections import collections
import math import math
import paddle.fluid as fluid
from op_test import OpTest from op_test import OpTest
......
...@@ -16,10 +16,6 @@ import unittest ...@@ -16,10 +16,6 @@ import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.nn.functional as F
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.tensor as tensor
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
from op_test import OpTest
import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import core
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.dygraph as dg
import paddle.fluid.core as core import paddle.fluid.core as core
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import core
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -16,10 +16,6 @@ import unittest ...@@ -16,10 +16,6 @@ import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.nn.functional as F
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.tensor as tensor
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import math
import numpy as np import numpy as np
from scipy.special import psi from scipy.special import psi
import paddle import paddle
......
...@@ -14,14 +14,10 @@ ...@@ -14,14 +14,10 @@
import os import os
import sys import sys
import time
import tempfile import tempfile
import subprocess import subprocess
import unittest import unittest
import numpy as np
import paddle
class TestDirectory(unittest.TestCase): class TestDirectory(unittest.TestCase):
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np import signal
import signal, os
import paddle
import subprocess import subprocess
SignalsToTest = { SignalsToTest = {
......
...@@ -18,7 +18,6 @@ import ast ...@@ -18,7 +18,6 @@ import ast
import unittest import unittest
import os import os
import sys import sys
import signal
import subprocess import subprocess
import six import six
import argparse import argparse
...@@ -30,10 +29,7 @@ import time ...@@ -30,10 +29,7 @@ import time
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler from paddle.fluid import compiler
import paddle.fluid.core as core
import paddle.fluid.dygraph as dygraph import paddle.fluid.dygraph as dygraph
from paddle.fluid.dygraph.base import to_variable
from paddle.fluid.dygraph.parallel import DataParallel, ParallelEnv
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
from paddle.fluid.incubate.fleet.collective import fleet, DistributedStrategy from paddle.fluid.incubate.fleet.collective import fleet, DistributedStrategy
import paddle.fluid.incubate.fleet.base.role_maker as role_maker import paddle.fluid.incubate.fleet.base.role_maker as role_maker
...@@ -655,7 +651,6 @@ class TestParallelDyGraphRunnerBase(object): ...@@ -655,7 +651,6 @@ class TestParallelDyGraphRunnerBase(object):
def run_use_fleet_api_trainer(self, args): def run_use_fleet_api_trainer(self, args):
import paddle.distributed.fleet as fleet import paddle.distributed.fleet as fleet
import paddle.distributed.fleet.base.role_maker as role_maker
# 1. enable dygraph # 1. enable dygraph
paddle.disable_static() paddle.disable_static()
...@@ -783,7 +778,6 @@ def runtime_main(test_class): ...@@ -783,7 +778,6 @@ def runtime_main(test_class):
model.run_trainer(args) model.run_trainer(args)
import paddle.compat as cpt
import socket import socket
from contextlib import closing from contextlib import closing
......
...@@ -13,12 +13,10 @@ ...@@ -13,12 +13,10 @@
# limitations under the License. # limitations under the License.
import os import os
import time
import unittest import unittest
import paddle import paddle
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import paddle.fluid.transpiler.details.program_utils as pu
paddle.enable_static() paddle.enable_static()
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import paddle import paddle
import os import os
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import time
paddle.enable_static() paddle.enable_static()
......
...@@ -18,7 +18,6 @@ os.environ["WITH_DISTRIBUTE"] = "ON" ...@@ -18,7 +18,6 @@ os.environ["WITH_DISTRIBUTE"] = "ON"
import unittest import unittest
import paddle import paddle
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import time
paddle.enable_static() paddle.enable_static()
......
...@@ -17,7 +17,6 @@ os.environ["WITH_DISTRIBUTE"] = "ON" ...@@ -17,7 +17,6 @@ os.environ["WITH_DISTRIBUTE"] = "ON"
import unittest import unittest
import paddle import paddle
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import time
paddle.enable_static() paddle.enable_static()
......
...@@ -16,7 +16,6 @@ import os ...@@ -16,7 +16,6 @@ import os
import unittest import unittest
import paddle import paddle
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import time
paddle.enable_static() paddle.enable_static()
......
...@@ -17,7 +17,6 @@ import paddle ...@@ -17,7 +17,6 @@ import paddle
import os import os
import paddle.distributed.fleet as fleet import paddle.distributed.fleet as fleet
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import time
paddle.enable_static() paddle.enable_static()
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
from paddle.distributed.fleet.utils.ps_util import DistributedInfer from paddle.distributed.fleet.utils.ps_util import DistributedInfer
from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler.distributed_strategy import StrategyFactory
import paddle.distributed.fleet as fleet import paddle.distributed.fleet as fleet
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import paddle.fluid as fluid import paddle.fluid as fluid
...@@ -26,9 +25,7 @@ import os ...@@ -26,9 +25,7 @@ import os
import sys import sys
import subprocess import subprocess
import six
import shutil import shutil
import numpy as np
import argparse import argparse
from contextlib import closing from contextlib import closing
import socket import socket
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import os import os
import unittest import unittest
import tempfile
from test_dist_fleet_base import TestFleetBase from test_dist_fleet_base import TestFleetBase
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import paddle.distributed.fleet as fleet import paddle.distributed.fleet as fleet
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import paddle.fluid as fluid import paddle.fluid as fluid
import os
import unittest import unittest
import paddle import paddle
......
...@@ -18,11 +18,7 @@ import tempfile ...@@ -18,11 +18,7 @@ import tempfile
import unittest import unittest
import subprocess import subprocess
import time import time
import paddle.fluid as fluid
#import paddle.fluid.incubate.fleet.base.role_maker as role_maker #import paddle.fluid.incubate.fleet.base.role_maker as role_maker
import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler import fleet
from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler.distributed_strategy import StrategyFactory
from test_dist_fleet_base import TestFleetBase from test_dist_fleet_base import TestFleetBase
#from dist_simnet_bow import train_network #from dist_simnet_bow import train_network
......
...@@ -19,9 +19,7 @@ import os ...@@ -19,9 +19,7 @@ import os
import sys import sys
import subprocess import subprocess
import six
import shutil import shutil
import numpy as np
import argparse import argparse
from contextlib import closing from contextlib import closing
import socket import socket
......
...@@ -16,9 +16,7 @@ import os ...@@ -16,9 +16,7 @@ import os
import shutil import shutil
import unittest import unittest
import tempfile import tempfile
import tarfile
from test_dist_fleet_base import TestFleetBase from test_dist_fleet_base import TestFleetBase
from paddle.dataset.common import download, DATA_HOME
class TestDistCtrInfer(TestFleetBase): class TestDistCtrInfer(TestFleetBase):
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import paddle import paddle
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import os import os
import unittest import unittest
import tempfile
import shutil
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -17,8 +17,6 @@ import os ...@@ -17,8 +17,6 @@ import os
os.environ["WITH_DISTRIBUTE"] = "ON" os.environ["WITH_DISTRIBUTE"] = "ON"
import unittest import unittest
import tempfile
import shutil
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -17,8 +17,6 @@ import os ...@@ -17,8 +17,6 @@ import os
os.environ["WITH_DISTRIBUTE"] = "ON" os.environ["WITH_DISTRIBUTE"] = "ON"
import unittest import unittest
import tempfile
import shutil
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -17,8 +17,6 @@ import os ...@@ -17,8 +17,6 @@ import os
os.environ["WITH_DISTRIBUTE"] = "ON" os.environ["WITH_DISTRIBUTE"] = "ON"
import unittest import unittest
import tempfile
import shutil
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import paddle import paddle
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import paddle import paddle
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import paddle import paddle
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import paddle import paddle
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import os import os
import unittest import unittest
import tempfile
from test_dist_fleet_base import TestFleetBase from test_dist_fleet_base import TestFleetBase
import paddle import paddle
......
...@@ -13,13 +13,11 @@ ...@@ -13,13 +13,11 @@
# limitations under the License. # limitations under the License.
import os import os
import time
import unittest import unittest
os.environ["WITH_DISTRIBUTE"] = "ON" os.environ["WITH_DISTRIBUTE"] = "ON"
import paddle import paddle
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
import paddle.fluid.transpiler.details.program_utils as pu
paddle.enable_static() paddle.enable_static()
......
...@@ -19,7 +19,7 @@ import tempfile ...@@ -19,7 +19,7 @@ import tempfile
import numpy as np import numpy as np
from test_dist_base import TestDistBase, RUN_STEP from test_dist_base import TestDistBase
import os import os
......
...@@ -17,10 +17,8 @@ import unittest ...@@ -17,10 +17,8 @@ import unittest
import numpy as np import numpy as np
import tempfile import tempfile
import shutil import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
......
...@@ -15,12 +15,9 @@ ...@@ -15,12 +15,9 @@
import os import os
import unittest import unittest
import numpy as np import numpy as np
import tempfile
import shutil import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
from test_dist_sparse_load_ps0 import SparseLoadOp from test_dist_sparse_load_ps0 import SparseLoadOp
......
...@@ -12,16 +12,9 @@ ...@@ -12,16 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import numpy as np
import tempfile
import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram
......
...@@ -12,16 +12,9 @@ ...@@ -12,16 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import numpy as np
import tempfile
import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram
......
...@@ -12,16 +12,9 @@ ...@@ -12,16 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import numpy as np
import tempfile
import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram
......
...@@ -12,16 +12,9 @@ ...@@ -12,16 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import numpy as np
import tempfile
import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram
......
...@@ -12,16 +12,9 @@ ...@@ -12,16 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import numpy as np
import tempfile
import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram from test_dist_sparse_tensor_load_sgd import TestSparseLoadProgram
......
...@@ -14,13 +14,8 @@ ...@@ -14,13 +14,8 @@
import os import os
import unittest import unittest
import numpy as np
import tempfile
import shutil
from op_test import OpTest, randomize_probability
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.distributed.fleet.base.role_maker as role_maker import paddle.distributed.fleet.base.role_maker as role_maker
from paddle.distributed.fleet import fleet from paddle.distributed.fleet import fleet
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import traceback
import math import math
import collections
import six import six
import unittest import unittest
......
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
import os import os
import tempfile import tempfile
import unittest import unittest
from paddle.dataset.common import download, DATA_HOME from paddle.dataset.common import download
from paddle.distributed.fleet.dataset import TreeIndex from paddle.distributed.fleet.dataset import TreeIndex
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math
import sys
import paddle import paddle
from op_test import OpTest from op_test import OpTest
......
...@@ -17,9 +17,8 @@ import paddle.fluid as fluid ...@@ -17,9 +17,8 @@ import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest, skip_check_grad_ci from op_test import OpTest
from paddle.fluid.op import Operator from paddle.fluid import Program, program_guard
from paddle.fluid import compiler, Program, program_guard
class DotOp(OpTest): class DotOp(OpTest):
......
...@@ -16,14 +16,8 @@ ...@@ -16,14 +16,8 @@
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import os import os
import signal
import subprocess
import time
import unittest import unittest
import sys import sys
from op_test import OpTest
from paddle.fluid.trainer_desc import DistMultiTrainer
from paddle.fluid.device_worker import DownpourSGD, DownpourSGDOPT
from paddle.fluid.incubate.fleet.parameter_server.pslib.node import DownpourWorker, DownpourServer from paddle.fluid.incubate.fleet.parameter_server.pslib.node import DownpourWorker, DownpourServer
from google.protobuf import text_format from google.protobuf import text_format
import paddle.fluid.incubate.fleet.parameter_server.pslib.ps_pb2 as pslib import paddle.fluid.incubate.fleet.parameter_server.pslib.ps_pb2 as pslib
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest, convert_float_to_uint16 from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode from paddle.fluid.framework import _non_static_mode
from paddle import _C_ops, _legacy_C_ops from paddle import _legacy_C_ops
from paddle.static import default_main_program from paddle.static import default_main_program
......
...@@ -21,9 +21,8 @@ import paddle.static as static ...@@ -21,9 +21,8 @@ import paddle.static as static
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard, _enable_legacy_dygraph from paddle.fluid.framework import _test_eager_guard, _enable_legacy_dygraph
import os
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops
class TestDropoutOp(OpTest): class TestDropoutOp(OpTest):
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import contextlib
import unittest import unittest
import numpy as np import numpy as np
import six import six
......
...@@ -18,7 +18,6 @@ import collections ...@@ -18,7 +18,6 @@ import collections
from functools import reduce from functools import reduce
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.nn.utils import weight_norm, remove_weight_norm from paddle.nn.utils import weight_norm, remove_weight_norm
......
...@@ -17,7 +17,5 @@ import unittest ...@@ -17,7 +17,5 @@ import unittest
fluid.core._set_eager_deletion_mode(0.0, 1.0, True) fluid.core._set_eager_deletion_mode(0.0, 1.0, True)
from test_conditional_block import *
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -23,7 +23,6 @@ import paddle ...@@ -23,7 +23,6 @@ import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler from paddle.fluid import compiler
import numpy as np
from fake_reader import fake_imdb_reader from fake_reader import fake_imdb_reader
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import unittest import unittest
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.layers as layers import paddle.fluid.layers as layers
import os import os
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import os import os
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.compiler as compiler
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid.layers as layers import paddle.fluid.layers as layers
import unittest import unittest
......
...@@ -21,7 +21,6 @@ import paddle.fluid as fluid ...@@ -21,7 +21,6 @@ import paddle.fluid as fluid
import paddle.fluid.layers as layers import paddle.fluid.layers as layers
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.backward import append_backward
import paddle.fluid.compiler as compiler import paddle.fluid.compiler as compiler
import numpy import numpy
import multiprocessing import multiprocessing
......
...@@ -14,13 +14,12 @@ ...@@ -14,13 +14,12 @@
import paddle import paddle
import numpy as np import numpy as np
from paddle import _C_ops, _legacy_C_ops from paddle import _legacy_C_ops
from paddle.fluid.framework import _test_eager_guard, Variable, _in_legacy_dygraph from paddle.fluid.framework import _test_eager_guard, Variable, _in_legacy_dygraph
from paddle.fluid import core from paddle.fluid import core
from paddle.fluid.layers.utils import _hash_with_id from paddle.fluid.layers.utils import _hash_with_id
from paddle.fluid.dygraph.base import switch_to_static_graph from paddle.fluid.dygraph.base import switch_to_static_graph
from paddle.fluid.executor import _is_enable_standalone_executor, _is_dy2st_enable_standalone_executor from paddle.fluid.executor import _is_enable_standalone_executor, _is_dy2st_enable_standalone_executor
import paddle.compat as cpt
import unittest import unittest
......
...@@ -14,12 +14,7 @@ ...@@ -14,12 +14,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle import paddle
import paddle.fluid.core as core
from paddle import _C_ops, _legacy_C_ops
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle.fluid.core as core
import paddle import paddle
import numpy as np import numpy as np
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -15,11 +15,9 @@ ...@@ -15,11 +15,9 @@
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle import paddle
import numpy as np import numpy as np
from paddle.fluid.framework import _test_eager_guard, EagerParamBase, _in_legacy_dygraph, in_dygraph_mode, _current_expected_place, _disable_legacy_dygraph from paddle.fluid.framework import EagerParamBase, _current_expected_place, _disable_legacy_dygraph, _test_eager_guard, in_dygraph_mode
from paddle.fluid.data_feeder import convert_dtype
import unittest import unittest
import copy import copy
import paddle.compat as cpt
class EagerScaleTestCase(unittest.TestCase): class EagerScaleTestCase(unittest.TestCase):
......
...@@ -13,11 +13,9 @@ ...@@ -13,11 +13,9 @@
# limitations under the License. # limitations under the License.
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle
import numpy as np import numpy as np
from paddle.fluid.framework import _test_eager_guard, in_dygraph_mode from paddle.fluid.framework import _test_eager_guard
import unittest import unittest
import copy
class EagerStringTensorTestCase(unittest.TestCase): class EagerStringTensorTestCase(unittest.TestCase):
......
...@@ -18,8 +18,6 @@ import paddle.fluid as fluid ...@@ -18,8 +18,6 @@ import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest, skip_check_grad_ci from op_test import OpTest, skip_check_grad_ci
import unittest import unittest
from paddle.fluid.op import Operator
from paddle.fluid import compiler, Program, program_guard
# cast output to complex for numpy.linalg.eig # cast output to complex for numpy.linalg.eig
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
from op_test import OpTest from op_test import OpTest
from gradient_checker import grad_check
def valid_eigh_result(A, eigh_value, eigh_vector, uplo): def valid_eigh_result(A, eigh_value, eigh_vector, uplo):
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import paddle import paddle
import unittest import unittest
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
from op_test import OpTest from op_test import OpTest
from gradient_checker import grad_check
def compare_result(actual, expected): def compare_result(actual, expected):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import numpy as np import numpy as np
import contextlib
import unittest import unittest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -13,11 +13,9 @@ ...@@ -13,11 +13,9 @@
# limitations under the License. # limitations under the License.
import numpy as np import numpy as np
import contextlib
import unittest import unittest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
from paddle.fluid.dygraph.amp.auto_cast import _is_gpu_bfloat16_supported
import os import os
......
...@@ -18,7 +18,7 @@ import paddle ...@@ -18,7 +18,7 @@ import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16 from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import random import random
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16 from op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
import os
import re
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle import paddle
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import random import random
......
...@@ -18,8 +18,7 @@ import numpy as np ...@@ -18,8 +18,7 @@ import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, compiler, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.op import Operator
from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16 from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
from op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16 from op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid
from paddle.fluid.data_feeder import convert_dtype from paddle.fluid.data_feeder import convert_dtype
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.static import program_guard, Program from paddle.static import program_guard, Program
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest from op_test import OpTest
from paddle.fluid import Program, program_guard
from paddle.fluid.framework import convert_np_dtype_to_dtype_ from paddle.fluid.framework import convert_np_dtype_to_dtype_
......
...@@ -18,8 +18,6 @@ paddle.enable_static() ...@@ -18,8 +18,6 @@ paddle.enable_static()
import unittest import unittest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.framework import default_main_program
from paddle.fluid.entry_attr import ProbabilityEntry, CountFilterEntry
class EntryAttrChecks(unittest.TestCase): class EntryAttrChecks(unittest.TestCase):
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.layers import mul, data, zeros, array_write, increment from paddle.fluid.layers import mul, data, zeros, array_write, increment
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
import unittest import unittest
import numpy
import paddle import paddle
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import numpy import numpy
import paddle import paddle
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest, skip_check_grad_ci from op_test import OpTest, skip_check_grad_ci
......
...@@ -16,7 +16,7 @@ import unittest ...@@ -16,7 +16,7 @@ import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
import paddle import paddle
......
...@@ -16,7 +16,7 @@ import unittest ...@@ -16,7 +16,7 @@ import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard, core from paddle.fluid import Program, core, program_guard
import paddle import paddle
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
import gradient_checker import gradient_checker
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import paddle import paddle
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import os
paddle.seed(100) paddle.seed(100)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册