Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
c1efbdd4
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
c1efbdd4
编写于
10月 11, 2022
作者:
N
Nyakku Shigure
提交者:
GitHub
10月 11, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CodeStyle][F401] remove unused import in unittests/(!test_) (#46693)
上级
7d1819b9
变更
64
显示空白变更内容
内联
并排
Showing
64 changed file
with
13 addition
and
321 deletion
+13
-321
python/paddle/fluid/tests/unittests/ascend_group.py
python/paddle/fluid/tests/unittests/ascend_group.py
+1
-3
python/paddle/fluid/tests/unittests/ascend_multi_process_collective.py
.../fluid/tests/unittests/ascend_multi_process_collective.py
+0
-1
python/paddle/fluid/tests/unittests/auto_checkpoint_utils.py
python/paddle/fluid/tests/unittests/auto_checkpoint_utils.py
+0
-7
python/paddle/fluid/tests/unittests/auto_parallel_autoconvert.py
...paddle/fluid/tests/unittests/auto_parallel_autoconvert.py
+0
-1
python/paddle/fluid/tests/unittests/auto_parallel_data_unshard.py
...addle/fluid/tests/unittests/auto_parallel_data_unshard.py
+0
-2
python/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py
...n/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py
+0
-5
python/paddle/fluid/tests/unittests/benchmark.py
python/paddle/fluid/tests/unittests/benchmark.py
+0
-4
python/paddle/fluid/tests/unittests/benchmark_sum_op.py
python/paddle/fluid/tests/unittests/benchmark_sum_op.py
+0
-2
python/paddle/fluid/tests/unittests/c_embedding_op_base.py
python/paddle/fluid/tests/unittests/c_embedding_op_base.py
+0
-2
python/paddle/fluid/tests/unittests/check_nan_inf_base.py
python/paddle/fluid/tests/unittests/check_nan_inf_base.py
+0
-3
python/paddle/fluid/tests/unittests/check_nan_inf_base_dygraph.py
...addle/fluid/tests/unittests/check_nan_inf_base_dygraph.py
+0
-2
python/paddle/fluid/tests/unittests/collective/communication_stream_allgather_api_dygraph.py
.../collective/communication_stream_allgather_api_dygraph.py
+0
-2
python/paddle/fluid/tests/unittests/collective/test_communication_stream_allgather_api.py
...sts/collective/test_communication_stream_allgather_api.py
+0
-2
python/paddle/fluid/tests/unittests/collective_allgather_op.py
...n/paddle/fluid/tests/unittests/collective_allgather_op.py
+0
-14
python/paddle/fluid/tests/unittests/collective_reducescatter.py
.../paddle/fluid/tests/unittests/collective_reducescatter.py
+0
-15
python/paddle/fluid/tests/unittests/collective_reducescatter_op.py
...ddle/fluid/tests/unittests/collective_reducescatter_op.py
+0
-15
python/paddle/fluid/tests/unittests/detected_gpu.py
python/paddle/fluid/tests/unittests/detected_gpu.py
+0
-1
python/paddle/fluid/tests/unittests/detected_xpu.py
python/paddle/fluid/tests/unittests/detected_xpu.py
+0
-1
python/paddle/fluid/tests/unittests/dist_allreduce_op.py
python/paddle/fluid/tests/unittests/dist_allreduce_op.py
+0
-11
python/paddle/fluid/tests/unittests/dist_fleet_ctr.py
python/paddle/fluid/tests/unittests/dist_fleet_ctr.py
+0
-2
python/paddle/fluid/tests/unittests/dist_fleet_ctr_ps_gpu.py
python/paddle/fluid/tests/unittests/dist_fleet_ctr_ps_gpu.py
+1
-1
python/paddle/fluid/tests/unittests/dist_fleet_debug_gloo.py
python/paddle/fluid/tests/unittests/dist_fleet_debug_gloo.py
+0
-6
python/paddle/fluid/tests/unittests/dist_fleet_heter_pipeline_ctr.py
...le/fluid/tests/unittests/dist_fleet_heter_pipeline_ctr.py
+0
-4
python/paddle/fluid/tests/unittests/dist_fleet_raw_program_optimizer.py
...fluid/tests/unittests/dist_fleet_raw_program_optimizer.py
+0
-3
python/paddle/fluid/tests/unittests/dist_fleet_raw_program_optimizer_fuse_allreduce.py
...ttests/dist_fleet_raw_program_optimizer_fuse_allreduce.py
+0
-3
python/paddle/fluid/tests/unittests/dist_fleet_simnet_bow.py
python/paddle/fluid/tests/unittests/dist_fleet_simnet_bow.py
+0
-11
python/paddle/fluid/tests/unittests/dist_fleet_sparse_embedding_ctr.py
.../fluid/tests/unittests/dist_fleet_sparse_embedding_ctr.py
+0
-2
python/paddle/fluid/tests/unittests/dist_mnist.py
python/paddle/fluid/tests/unittests/dist_mnist.py
+1
-12
python/paddle/fluid/tests/unittests/dist_mnist_batch_merge.py
...on/paddle/fluid/tests/unittests/dist_mnist_batch_merge.py
+0
-12
python/paddle/fluid/tests/unittests/dist_mnist_lars.py
python/paddle/fluid/tests/unittests/dist_mnist_lars.py
+0
-12
python/paddle/fluid/tests/unittests/dist_save_load.py
python/paddle/fluid/tests/unittests/dist_save_load.py
+1
-10
python/paddle/fluid/tests/unittests/dist_se_resnext.py
python/paddle/fluid/tests/unittests/dist_se_resnext.py
+0
-10
python/paddle/fluid/tests/unittests/dist_sharding_save.py
python/paddle/fluid/tests/unittests/dist_sharding_save.py
+1
-4
python/paddle/fluid/tests/unittests/dist_text_classification.py
.../paddle/fluid/tests/unittests/dist_text_classification.py
+0
-11
python/paddle/fluid/tests/unittests/dist_transformer.py
python/paddle/fluid/tests/unittests/dist_transformer.py
+0
-10
python/paddle/fluid/tests/unittests/dist_word2vec.py
python/paddle/fluid/tests/unittests/dist_word2vec.py
+0
-9
python/paddle/fluid/tests/unittests/distributed_fused_lamb_test_base.py
...fluid/tests/unittests/distributed_fused_lamb_test_base.py
+0
-3
python/paddle/fluid/tests/unittests/dygraph_fleet_api.py
python/paddle/fluid/tests/unittests/dygraph_fleet_api.py
+0
-8
python/paddle/fluid/tests/unittests/dygraph_recompute_hybrid.py
.../paddle/fluid/tests/unittests/dygraph_recompute_hybrid.py
+0
-4
python/paddle/fluid/tests/unittests/find_ports.py
python/paddle/fluid/tests/unittests/find_ports.py
+0
-1
python/paddle/fluid/tests/unittests/fleet_heter_ps_training.py
...n/paddle/fluid/tests/unittests/fleet_heter_ps_training.py
+0
-1
python/paddle/fluid/tests/unittests/gradient_checker.py
python/paddle/fluid/tests/unittests/gradient_checker.py
+0
-3
python/paddle/fluid/tests/unittests/hccl_tools.py
python/paddle/fluid/tests/unittests/hccl_tools.py
+0
-1
python/paddle/fluid/tests/unittests/hdfs_test_utils.py
python/paddle/fluid/tests/unittests/hdfs_test_utils.py
+1
-5
python/paddle/fluid/tests/unittests/hybrid_parallel_pp_layer.py
.../paddle/fluid/tests/unittests/hybrid_parallel_pp_layer.py
+0
-2
python/paddle/fluid/tests/unittests/ir_memory_optimize_net_base.py
...ddle/fluid/tests/unittests/ir_memory_optimize_net_base.py
+0
-2
python/paddle/fluid/tests/unittests/launch_function_helper.py
...on/paddle/fluid/tests/unittests/launch_function_helper.py
+1
-1
python/paddle/fluid/tests/unittests/my_data_generator.py
python/paddle/fluid/tests/unittests/my_data_generator.py
+0
-6
python/paddle/fluid/tests/unittests/nproc_process.py
python/paddle/fluid/tests/unittests/nproc_process.py
+0
-1
python/paddle/fluid/tests/unittests/op_test.py
python/paddle/fluid/tests/unittests/op_test.py
+1
-5
python/paddle/fluid/tests/unittests/op_test_xpu.py
python/paddle/fluid/tests/unittests/op_test_xpu.py
+3
-17
python/paddle/fluid/tests/unittests/parallel_dygraph_dataparallel_with_pylayer.py
...s/unittests/parallel_dygraph_dataparallel_with_pylayer.py
+0
-2
python/paddle/fluid/tests/unittests/parallel_dygraph_gradient_check.py
.../fluid/tests/unittests/parallel_dygraph_gradient_check.py
+0
-1
python/paddle/fluid/tests/unittests/parallel_dygraph_gradient_check_in_eager_mode.py
...nittests/parallel_dygraph_gradient_check_in_eager_mode.py
+0
-4
python/paddle/fluid/tests/unittests/parallel_dygraph_mnist.py
...on/paddle/fluid/tests/unittests/parallel_dygraph_mnist.py
+0
-8
python/paddle/fluid/tests/unittests/parallel_dygraph_none_var.py
...paddle/fluid/tests/unittests/parallel_dygraph_none_var.py
+0
-6
python/paddle/fluid/tests/unittests/parallel_dygraph_shared_unused_var.py
...uid/tests/unittests/parallel_dygraph_shared_unused_var.py
+1
-3
python/paddle/fluid/tests/unittests/parallel_dygraph_sparse_embedding_over_height.py
...nittests/parallel_dygraph_sparse_embedding_over_height.py
+1
-1
python/paddle/fluid/tests/unittests/ps_dnn_model.py
python/paddle/fluid/tests/unittests/ps_dnn_model.py
+0
-2
python/paddle/fluid/tests/unittests/seresnext_net.py
python/paddle/fluid/tests/unittests/seresnext_net.py
+0
-2
python/paddle/fluid/tests/unittests/simnet_dataset_reader.py
python/paddle/fluid/tests/unittests/simnet_dataset_reader.py
+0
-5
python/paddle/fluid/tests/unittests/static_model_parallel_fused_multi_transformer.py
...nittests/static_model_parallel_fused_multi_transformer.py
+0
-6
python/paddle/fluid/tests/unittests/transformer_model.py
python/paddle/fluid/tests/unittests/transformer_model.py
+0
-1
python/paddle/fluid/tests/unittests/utils.py
python/paddle/fluid/tests/unittests/utils.py
+0
-5
未找到文件。
python/paddle/fluid/tests/unittests/ascend_group.py
浏览文件 @
c1efbdd4
...
...
@@ -13,15 +13,13 @@
# limitations under the License.
import
os
import
sys
import
time
import
paddle.fluid
as
fluid
from
paddle.fluid
import
unique_name
import
paddle.fluid.core
as
core
import
paddle
from
paddle.fluid.layer_helper
import
LayerHelper
from
paddle.distributed
import
fleet
from
paddle.distributed.fleet.meta_optimizers.ascend
import
ascend_
parser
,
ascend_
optimizer
from
paddle.distributed.fleet.meta_optimizers.ascend
import
ascend_optimizer
from
collections
import
namedtuple
Block
=
namedtuple
(
'Block'
,
[
'program'
])
...
...
python/paddle/fluid/tests/unittests/ascend_multi_process_collective.py
浏览文件 @
c1efbdd4
...
...
@@ -14,7 +14,6 @@
import
os
import
sys
import
time
def
train
(
prefix
):
...
...
python/paddle/fluid/tests/unittests/auto_checkpoint_utils.py
浏览文件 @
c1efbdd4
...
...
@@ -13,21 +13,14 @@
# limitations under the License.
import
unittest
import
paddle
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
import
os
import
sys
from
paddle.distributed.fleet.utils.fs
import
LocalFS
,
HDFSClient
import
paddle.fluid.incubate.checkpoint.auto_checkpoint
as
acp
from
paddle.fluid.incubate.checkpoint.checkpoint_saver
import
PaddleModel
from
paddle.fluid.framework
import
program_guard
from
paddle.fluid
import
unique_name
import
numpy
as
np
from
paddle.io
import
Dataset
,
BatchSampler
,
DataLoader
BATCH_NUM
=
4
BATCH_SIZE
=
1
...
...
python/paddle/fluid/tests/unittests/auto_parallel_autoconvert.py
浏览文件 @
c1efbdd4
...
...
@@ -16,7 +16,6 @@ import unittest
import
random
import
numpy
as
np
import
os
import
shutil
import
paddle
import
paddle.nn
as
nn
...
...
python/paddle/fluid/tests/unittests/auto_parallel_data_unshard.py
浏览文件 @
c1efbdd4
...
...
@@ -14,13 +14,11 @@
import
unittest
import
copy
import
numpy
as
np
import
random
import
paddle
import
paddle.nn
as
nn
import
paddle.fluid.core
as
core
from
paddle.distributed.fleet
import
auto
import
paddle.nn.functional
as
F
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py
浏览文件 @
c1efbdd4
...
...
@@ -13,19 +13,14 @@
# limitations under the License.
import
collections
import
random
import
numpy
as
np
import
paddle
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
paddle.tensor
as
tensor
from
paddle.distributed.fleet
import
auto
from
paddle
import
fluid
from
paddle.fluid
import
layers
from
paddle.distributed
import
fleet
from
paddle.nn.layer.transformer
import
_convert_param_attr_to_list
from
paddle.fluid.initializer
import
Normal
,
NumpyArrayInitializer
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/benchmark.py
浏览文件 @
c1efbdd4
...
...
@@ -13,13 +13,9 @@
# limitations under the License.
import
numpy
as
np
import
unittest
import
time
import
itertools
import
six
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
from
paddle.fluid.op
import
Operator
from
op_test
import
OpTest
...
...
python/paddle/fluid/tests/unittests/benchmark_sum_op.py
浏览文件 @
c1efbdd4
...
...
@@ -15,9 +15,7 @@
import
unittest
import
numpy
as
np
import
paddle.fluid
as
fluid
from
benchmark
import
BenchmarkSuite
from
op_test
import
OpTest
# This is a demo op test case for operator benchmarking and high resolution number stability alignment.
...
...
python/paddle/fluid/tests/unittests/c_embedding_op_base.py
浏览文件 @
c1efbdd4
...
...
@@ -15,8 +15,6 @@
import
unittest
import
numpy
as
np
from
op_test
import
OpTest
import
paddle
import
paddle.fluid
as
fluid
from
paddle.framework
import
core
SEED
=
2021
...
...
python/paddle/fluid/tests/unittests/check_nan_inf_base.py
浏览文件 @
c1efbdd4
...
...
@@ -13,8 +13,6 @@
# limitations under the License.
import
os
import
sys
import
time
import
numpy
as
np
os
.
environ
[
str
(
"FLAGS_check_nan_inf"
)]
=
str
(
"1"
)
...
...
@@ -23,7 +21,6 @@ os.environ[str("GLOG_vmodule")] = str("nan_inf_utils_detail=10")
import
paddle.fluid.core
as
core
import
paddle
import
paddle.fluid
as
fluid
import
paddle.compat
as
cpt
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/check_nan_inf_base_dygraph.py
浏览文件 @
c1efbdd4
...
...
@@ -13,8 +13,6 @@
# limitations under the License.
import
os
import
sys
import
time
import
numpy
as
np
os
.
environ
[
str
(
"FLAGS_check_nan_inf"
)]
=
str
(
"1"
)
...
...
python/paddle/fluid/tests/unittests/collective/communication_stream_allgather_api_dygraph.py
浏览文件 @
c1efbdd4
...
...
@@ -15,9 +15,7 @@
import
os
import
numpy
as
np
import
paddle
import
paddle.fluid
as
fluid
import
paddle.distributed
as
dist
import
test_communication_api_base
as
test_base
import
test_collective_api_base
as
test_collective_base
...
...
python/paddle/fluid/tests/unittests/collective/test_communication_stream_allgather_api.py
浏览文件 @
c1efbdd4
...
...
@@ -13,8 +13,6 @@
# limitations under the License.
import
unittest
import
paddle
import
itertools
import
test_communication_api_base
as
test_base
...
...
python/paddle/fluid/tests/unittests/collective_allgather_op.py
浏览文件 @
c1efbdd4
...
...
@@ -12,24 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
os
import
sys
import
signal
import
time
from
contextlib
import
closing
from
six
import
string_types
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
import
paddle.fluid.unique_name
as
nameGen
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
paddle.fluid.layers
as
layers
from
functools
import
reduce
from
test_collective_base
import
TestCollectiveRunnerBase
,
runtime_main
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/collective_reducescatter.py
浏览文件 @
c1efbdd4
...
...
@@ -12,24 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
os
import
sys
import
signal
import
time
from
contextlib
import
closing
from
six
import
string_types
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
import
paddle.fluid.unique_name
as
nameGen
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
paddle.fluid.layers
as
layers
from
functools
import
reduce
from
test_collective_base
import
TestCollectiveRunnerBase
,
runtime_main
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/collective_reducescatter_op.py
浏览文件 @
c1efbdd4
...
...
@@ -12,25 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
os
import
sys
import
signal
import
time
import
socket
from
contextlib
import
closing
from
six
import
string_types
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
import
paddle.fluid.unique_name
as
nameGen
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
paddle.fluid.layers
as
layers
from
functools
import
reduce
from
test_collective_base
import
TestCollectiveRunnerBase
,
runtime_main
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/detected_gpu.py
浏览文件 @
c1efbdd4
...
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
import
sys
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/detected_xpu.py
浏览文件 @
c1efbdd4
...
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
import
sys
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/dist_allreduce_op.py
浏览文件 @
c1efbdd4
...
...
@@ -12,19 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
signal
from
functools
import
reduce
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
...
...
python/paddle/fluid/tests/unittests/dist_fleet_ctr.py
浏览文件 @
c1efbdd4
...
...
@@ -26,8 +26,6 @@ import numpy as np
import
ctr_dataset_reader
from
test_dist_fleet_base
import
runtime_main
,
FleetDistRunnerBase
from
paddle.distributed.fleet.utils.ps_util
import
DistributedInfer
import
paddle.distributed.fleet
as
fleet
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/dist_fleet_ctr_ps_gpu.py
浏览文件 @
c1efbdd4
...
...
@@ -25,7 +25,7 @@ import os
import
numpy
as
np
import
ctr_dataset_reader
from
test_dist_fleet_base
import
runtime_main
,
FleetDistRunnerBase
from
test_dist_fleet_base
import
runtime_main
from
dist_fleet_ctr
import
TestDistCTR2x2
,
fake_ctr_reader
# Fix seed for test
...
...
python/paddle/fluid/tests/unittests/dist_fleet_debug_gloo.py
浏览文件 @
c1efbdd4
...
...
@@ -12,16 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
os
import
time
import
numpy
as
np
import
logging
import
paddle
import
paddle.fluid
as
fluid
#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.transpiler.distribute_transpiler
import
DistributeTranspilerConfig
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(message)s"
)
logger
=
logging
.
getLogger
(
"fluid"
)
...
...
python/paddle/fluid/tests/unittests/dist_fleet_heter_pipeline_ctr.py
浏览文件 @
c1efbdd4
...
...
@@ -15,18 +15,14 @@
Distribute CTR model for test fleet api
"""
import
shutil
import
tempfile
import
time
import
paddle
import
paddle.fluid
as
fluid
import
os
import
numpy
as
np
import
ctr_dataset_reader
from
test_dist_fleet_heter_base
import
runtime_main
,
FleetDistHeterRunnerBase
from
dist_fleet_ctr
import
TestDistCTR2x2
,
fake_ctr_reader
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/dist_fleet_raw_program_optimizer.py
浏览文件 @
c1efbdd4
...
...
@@ -13,12 +13,9 @@
# limitations under the License.
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
import
unittest
import
paddle
import
os
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.fleet.base.role_maker
as
role_maker
import
numpy
as
np
from
functools
import
reduce
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/dist_fleet_raw_program_optimizer_fuse_allreduce.py
浏览文件 @
c1efbdd4
...
...
@@ -13,12 +13,9 @@
# limitations under the License.
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
import
unittest
import
paddle
import
os
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.fleet.base.role_maker
as
role_maker
import
numpy
as
np
from
functools
import
reduce
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/dist_fleet_simnet_bow.py
浏览文件 @
c1efbdd4
...
...
@@ -13,22 +13,11 @@
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
random
import
shutil
import
tempfile
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
signal
from
functools
import
reduce
from
test_dist_fleet_base
import
runtime_main
,
FleetDistRunnerBase
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/dist_fleet_sparse_embedding_ctr.py
浏览文件 @
c1efbdd4
...
...
@@ -16,9 +16,7 @@ Distribute CTR model for test fleet api
"""
import
os
import
time
import
random
import
numpy
as
np
import
paddle
...
...
python/paddle/fluid/tests/unittests/dist_mnist.py
浏览文件 @
c1efbdd4
...
...
@@ -12,22 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
signal
from
functools
import
reduce
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
from
paddle.fluid.incubate.fleet.collective
import
fleet
,
DistributedStrategy
from
paddle.fluid.incubate.fleet.collective
import
fleet
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/dist_mnist_batch_merge.py
浏览文件 @
c1efbdd4
...
...
@@ -12,20 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
signal
from
functools
import
reduce
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
from
dist_mnist
import
cnn_model
...
...
python/paddle/fluid/tests/unittests/dist_mnist_lars.py
浏览文件 @
c1efbdd4
...
...
@@ -12,20 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
signal
from
functools
import
reduce
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
from
dist_mnist
import
cnn_model
...
...
python/paddle/fluid/tests/unittests/dist_save_load.py
浏览文件 @
c1efbdd4
...
...
@@ -14,18 +14,9 @@
import
os
import
sys
import
signal
import
subprocess
import
argparse
import
time
import
math
import
random
from
multiprocessing
import
Process
from
functools
import
reduce
import
numpy
as
np
import
pickle
import
unittest
import
six
import
paddle
...
...
@@ -33,7 +24,7 @@ import paddle.fluid as fluid
from
paddle.fluid
import
core
from
paddle.fluid
import
io
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
,
RUN_STEP
from
test_dist_base
import
RUN_STEP
,
runtime_main
from
dist_simnet_bow
import
TestDistSimnetBow2x2
,
DATA_URL
,
DATA_MD5
...
...
python/paddle/fluid/tests/unittests/dist_se_resnext.py
浏览文件 @
c1efbdd4
...
...
@@ -12,20 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
sys
import
signal
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/dist_sharding_save.py
浏览文件 @
c1efbdd4
...
...
@@ -14,10 +14,7 @@
import
paddle
import
paddle.fluid
as
fluid
from
test_dist_base
import
TestDistRunnerBase
from
dist_mnist
import
cnn_model
# from paddle.fluid.incubate.fleet.collective import fleet
import
paddle.distributed.fleet
as
fleet
from
dist_mnist
import
cnn_model
# noqa: F401
import
paddle.distributed.fleet.base.role_maker
as
role_maker
import
paddle.distributed.fleet.meta_optimizers.sharding
as
sharding
...
...
python/paddle/fluid/tests/unittests/dist_text_classification.py
浏览文件 @
c1efbdd4
...
...
@@ -12,24 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
signal
import
six
import
tarfile
import
string
import
re
from
functools
import
reduce
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
DTYPE
=
"float32"
...
...
python/paddle/fluid/tests/unittests/dist_transformer.py
浏览文件 @
c1efbdd4
...
...
@@ -13,15 +13,9 @@
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
os
import
sys
import
six
import
argparse
import
ast
import
multiprocessing
import
time
from
functools
import
partial
from
os.path
import
expanduser
...
...
@@ -29,16 +23,12 @@ import glob
import
random
import
tarfile
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.layers
as
layers
from
paddle.fluid
import
core
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
,
RUN_STEP
import
paddle.compat
as
cpt
from
paddle.compat
import
long_type
import
hashlib
const_para_attr
=
fluid
.
ParamAttr
(
initializer
=
fluid
.
initializer
.
Constant
(
0.001
))
const_bias_attr
=
const_para_attr
...
...
python/paddle/fluid/tests/unittests/dist_word2vec.py
浏览文件 @
c1efbdd4
...
...
@@ -12,18 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
numpy
as
np
import
argparse
import
time
import
math
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.profiler
as
profiler
from
paddle.fluid
import
core
import
unittest
from
multiprocessing
import
Process
import
os
import
signal
from
test_dist_base
import
TestDistRunnerBase
,
runtime_main
IS_SPARSE
=
True
...
...
python/paddle/fluid/tests/unittests/distributed_fused_lamb_test_base.py
浏览文件 @
c1efbdd4
...
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
argparse
import
os
import
paddle
import
paddle.fluid.core
as
core
...
...
@@ -21,11 +20,9 @@ from paddle.incubate import DistributedFusedLamb
from
paddle.vision.models
import
resnet18
as
resnet
from
paddle.distributed.fleet.meta_optimizers.common
import
CollectiveHelper
from
paddle.fluid.clip
import
ClipGradBase
import
paddle.nn
as
nn
import
numpy
as
np
import
os
import
unittest
from
paddle.distributed.fleet.meta_optimizers.common
import
is_optimizer_op
,
is_backward_op
from
paddle.fluid.clip
import
_clip_by_global_norm_using_mp_type
import
distutils
...
...
python/paddle/fluid/tests/unittests/dygraph_fleet_api.py
浏览文件 @
c1efbdd4
...
...
@@ -15,17 +15,9 @@
import
unittest
import
random
import
numpy
as
np
import
os
import
shutil
import
paddle
import
paddle.nn
as
nn
from
paddle.fluid
import
core
import
datetime
from
datetime
import
timedelta
import
paddle.fluid.core
as
core
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.dygraph.parallel
import
ParallelEnv
class
TestDygraphFleetAPI
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/dygraph_recompute_hybrid.py
浏览文件 @
c1efbdd4
...
...
@@ -16,14 +16,10 @@ import unittest
import
numpy
as
np
import
paddle
from
paddle.autograd
import
PyLayer
from
paddle.distributed.fleet.utils
import
recompute
from
paddle.incubate.distributed.fleet
import
recompute_hybrid
import
random
from
paddle.distributed
import
fleet
import
paddle.fluid.layers
as
layers
def
get_fc_block
(
block_idx
,
input_size
,
is_last
=
False
):
block_name
=
"block_"
+
str
(
block_idx
)
...
...
python/paddle/fluid/tests/unittests/find_ports.py
浏览文件 @
c1efbdd4
...
...
@@ -14,7 +14,6 @@
import
os
import
sys
import
time
def
train
():
...
...
python/paddle/fluid/tests/unittests/fleet_heter_ps_training.py
浏览文件 @
c1efbdd4
...
...
@@ -15,7 +15,6 @@
import
paddle
import
paddle.fluid
as
fluid
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.fleet.base.role_maker
as
role_maker
fluid
.
disable_dygraph
()
...
...
python/paddle/fluid/tests/unittests/gradient_checker.py
浏览文件 @
c1efbdd4
...
...
@@ -13,16 +13,13 @@
# limitations under the License.
"""This is the lib for gradient checker unittest."""
import
unittest
import
six
import
collections
import
numpy
as
np
from
itertools
import
product
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.backward
import
_append_grad_suffix_
,
_as_list
from
paddle.fluid.framework
import
_test_eager_guard
try
:
...
...
python/paddle/fluid/tests/unittests/hccl_tools.py
浏览文件 @
c1efbdd4
...
...
@@ -34,7 +34,6 @@ import sys
import
json
import
socket
from
argparse
import
ArgumentParser
from
typing
import
Dict
,
Any
def
parse_args
():
...
...
python/paddle/fluid/tests/unittests/hdfs_test_utils.py
浏览文件 @
c1efbdd4
...
...
@@ -13,13 +13,9 @@
# limitations under the License.
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
import
os
import
sys
from
paddle.distributed.fleet.utils.fs
import
LocalFS
,
HDFSClient
,
FSTimeOut
,
FSFileExistsError
,
FSFileNotExistsError
from
paddle.distributed.fleet.utils.fs
import
FSFileExistsError
,
FSFileNotExistsError
,
HDFSClient
,
LocalFS
java_home
=
os
.
environ
[
"JAVA_HOME"
]
...
...
python/paddle/fluid/tests/unittests/hybrid_parallel_pp_layer.py
浏览文件 @
c1efbdd4
...
...
@@ -14,8 +14,6 @@
import
unittest
import
numpy
as
np
import
os
import
paddle
from
paddle.distributed
import
fleet
from
paddle.fluid.dygraph.container
import
Sequential
import
paddle.nn
as
nn
...
...
python/paddle/fluid/tests/unittests/ir_memory_optimize_net_base.py
浏览文件 @
c1efbdd4
...
...
@@ -14,11 +14,9 @@
import
os
import
sys
import
six
import
unittest
import
time
import
math
import
multiprocessing
import
numpy
as
np
import
paddle
...
...
python/paddle/fluid/tests/unittests/launch_function_helper.py
浏览文件 @
c1efbdd4
...
...
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
multiprocessing
import
P
ool
,
P
rocess
from
multiprocessing
import
Process
import
os
import
socket
from
contextlib
import
closing
...
...
python/paddle/fluid/tests/unittests/my_data_generator.py
浏览文件 @
c1efbdd4
...
...
@@ -12,12 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
sys
import
os
import
paddle
import
re
import
collections
import
time
import
paddle.distributed.fleet
as
fleet
...
...
python/paddle/fluid/tests/unittests/nproc_process.py
浏览文件 @
c1efbdd4
...
...
@@ -14,7 +14,6 @@
import
os
import
sys
import
time
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/op_test.py
浏览文件 @
c1efbdd4
...
...
@@ -20,9 +20,6 @@ import numpy as np
import
random
import
six
import
struct
import
time
import
itertools
import
collections
from
collections
import
defaultdict
from
copy
import
copy
...
...
@@ -35,7 +32,7 @@ from paddle.fluid.framework import _test_eager_guard
from
paddle.fluid.backward
import
append_backward
from
paddle.fluid.op
import
Operator
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.framework
import
Program
,
OpProtoHolder
,
Variable
,
_current_expected_place
from
paddle.fluid.framework
import
OpProtoHolder
,
Program
,
_current_expected_place
from
paddle.fluid
import
unique_name
from
paddle.fluid.dygraph.dygraph_to_static.utils
import
parse_arg_and_kwargs
...
...
@@ -1423,7 +1420,6 @@ class OpTest(unittest.TestCase):
judge whether convert current output and expect to uint16.
return True | False
"""
pass
def
_is_skip_name
(
self
,
name
):
if
name
not
in
self
.
expects
:
...
...
python/paddle/fluid/tests/unittests/op_test_xpu.py
浏览文件 @
c1efbdd4
...
...
@@ -12,30 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
os
import
unittest
import
warnings
import
numpy
as
np
import
random
import
six
import
struct
import
time
import
itertools
import
collections
from
collections
import
defaultdict
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
from
paddle.fluid.backward
import
append_backward
from
paddle.fluid.op
import
Operator
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.framework
import
Program
,
OpProtoHolder
,
Variable
,
convert_np_dtype_to_dtype_
from
testsuite
import
create_op
,
set_input
,
append_input_output
,
append_loss_ops
from
paddle.fluid
import
unique_name
from
white_list
import
op_accuracy_white_list
,
check_shape_white_list
,
compile_vs_runtime_white_list
,
no_check_set_white_list
from
paddle.fluid.framework
import
Program
,
convert_np_dtype_to_dtype_
from
testsuite
import
append_loss_ops
,
create_op
,
set_input
from
white_list
import
op_threshold_white_list
,
no_grad_set_white_list
from
op_test
import
OpTest
,
_set_use_system_allocator
,
get_numeric_gradient
from
op_test
import
OpTest
from
xpu.get_test_cover_info
import
is_empty_grad_op_type
,
get_xpu_op_support_types
,
type_dict_str_to_numpy
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_dataparallel_with_pylayer.py
浏览文件 @
c1efbdd4
...
...
@@ -17,9 +17,7 @@ import unittest
import
paddle
import
numpy
as
np
import
paddle.distributed
as
dist
from
paddle.fluid.dygraph.nn
import
Linear
from
paddle.autograd
import
PyLayer
from
paddle.fluid.framework
import
in_dygraph_mode
,
_in_legacy_dygraph
from
paddle.distributed.fleet.utils.hybrid_parallel_util
import
fused_allreduce_gradients
batch
=
5
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_gradient_check.py
浏览文件 @
c1efbdd4
...
...
@@ -13,7 +13,6 @@
# limitations under the License.
import
unittest
import
os
import
paddle
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_gradient_check_in_eager_mode.py
浏览文件 @
c1efbdd4
...
...
@@ -13,8 +13,6 @@
# limitations under the License.
import
unittest
import
os
import
copy
import
paddle
import
numpy
as
np
...
...
@@ -22,8 +20,6 @@ import paddle.distributed as dist
import
paddle.fluid
as
fluid
from
paddle.fluid.dygraph.nn
import
Linear
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.dygraph.parallel
import
ParallelEnv
import
paddle.fluid.core
as
core
paddle
.
seed
(
1024
)
np
.
random
.
seed
(
2021
)
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_mnist.py
浏览文件 @
c1efbdd4
...
...
@@ -12,18 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
os
import
contextlib
import
unittest
import
numpy
as
np
import
six
import
pickle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.dygraph
as
dygraph
from
paddle.fluid
import
core
from
paddle.fluid.optimizer
import
SGDOptimizer
from
paddle.fluid.dygraph.nn
import
Conv2D
,
Pool2D
,
Linear
from
paddle.fluid.dygraph.base
import
to_variable
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_none_var.py
浏览文件 @
c1efbdd4
...
...
@@ -12,16 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
contextlib
import
unittest
import
numpy
as
np
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.dygraph
as
dygraph
from
paddle.fluid
import
core
from
paddle.fluid.optimizer
import
SGDOptimizer
from
paddle.fluid.dygraph.nn
import
Linear
from
test_dist_base
import
runtime_main
,
TestParallelDyGraphRunnerBase
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_shared_unused_var.py
浏览文件 @
c1efbdd4
...
...
@@ -12,12 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
unittest
import
numpy
as
np
import
paddle
import
paddle.fluid
as
fluid
from
paddle.fluid.optimizer
import
SGDOptimizer
from
paddle.fluid.dygraph.nn
import
Conv2D
,
Pool2D
,
Linear
from
paddle.fluid.dygraph.nn
import
Linear
from
paddle.fluid.dygraph.base
import
to_variable
from
test_dist_base
import
runtime_main
,
TestParallelDyGraphRunnerBase
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_sparse_embedding_over_height.py
浏览文件 @
c1efbdd4
...
...
@@ -16,7 +16,7 @@ import paddle
import
paddle.fluid
as
fluid
from
parallel_dygraph_sparse_embedding
import
SimpleNet
,
fake_sample_reader
,
TestSparseEmbedding
from
test_dist_base
import
runtime_main
,
TestParallelDyGraphRunnerBase
from
test_dist_base
import
runtime_main
# global configs
# using small `vocab_size` to test rows number over height
...
...
python/paddle/fluid/tests/unittests/ps_dnn_model.py
浏览文件 @
c1efbdd4
...
...
@@ -14,9 +14,7 @@
import
paddle
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
math
import
paddle.distributed.fleet
as
fleet
class
DNNLayer
(
nn
.
Layer
):
...
...
python/paddle/fluid/tests/unittests/seresnext_net.py
浏览文件 @
c1efbdd4
...
...
@@ -17,11 +17,9 @@ import paddle.fluid as fluid
fluid
.
core
.
_set_eager_deletion_mode
(
-
1
,
-
1
,
False
)
import
paddle
import
paddle.fluid.layers.ops
as
ops
from
paddle.fluid.layers.learning_rate_scheduler
import
cosine_decay
from
simple_nets
import
init_data
from
seresnext_test_base
import
DeviceType
import
math
import
os
os
.
environ
[
'CPU_NUM'
]
=
str
(
4
)
...
...
python/paddle/fluid/tests/unittests/simnet_dataset_reader.py
浏览文件 @
c1efbdd4
...
...
@@ -12,13 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
os
import
logging
import
tarfile
import
random
import
paddle
import
paddle.distributed.fleet
as
fleet
logging
.
basicConfig
()
...
...
python/paddle/fluid/tests/unittests/static_model_parallel_fused_multi_transformer.py
浏览文件 @
c1efbdd4
...
...
@@ -20,12 +20,6 @@ from test_dist_base import TestDistRunnerBase, runtime_main
from
paddle.incubate.nn
import
FusedMultiTransformer
import
paddle.distributed.fleet
as
fleet
from
paddle.fluid.data_feeder
import
check_variable_and_dtype
,
check_dtype
from
paddle.fluid.dygraph.layers
import
Layer
from
paddle.fluid.layer_helper
import
LayerHelper
from
paddle.fluid
import
core
from
paddle.nn.initializer
import
Constant
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/transformer_model.py
浏览文件 @
c1efbdd4
...
...
@@ -15,7 +15,6 @@
from
functools
import
partial
import
numpy
as
np
import
os
import
paddle.fluid
as
fluid
import
paddle.fluid.layers
as
layers
...
...
python/paddle/fluid/tests/unittests/utils.py
浏览文件 @
c1efbdd4
...
...
@@ -14,12 +14,7 @@
from
paddle.fluid.framework
import
_dygraph_guard
import
paddle.fluid
as
fluid
from
paddle.fluid.framework
import
Variable
import
paddle.fluid.dygraph.jit
as
jit
from
paddle.fluid.dygraph.jit
import
extract_vars
import
numpy
as
np
import
os
import
time
__all__
=
[
'DyGraphProgramDescTracerTestHelper'
,
'is_equal_program'
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录