From 8b1b214f29b24dc45c7bcf78db2e30d9e4542258 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Thu, 6 May 2021 10:01:44 +0800 Subject: [PATCH] Change Paddle CI-Cverage Python3.8 (#32515) --- README.md | 3 +-- paddle/scripts/paddle_build.sh | 1 + .../tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py | 1 - python/paddle/fluid/tests/unittests/test_fusion_gru_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_fusion_lstm_op.py | 2 +- python/paddle/fluid/tests/unittests/test_gru_op.py | 2 +- python/unittest_py/requirements.txt | 1 + tools/summary_env.py | 5 +++-- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e8a7013d0b4..8b437e4115a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ - -

+

diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index b8b9f40aa33..0865d48c0d3 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -1450,6 +1450,7 @@ function parallel_test() { mkdir -p ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build pip install ${PADDLE_ROOT}/build/python/dist/*whl + cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/op_test.py ${PADDLE_ROOT}/build/python if [ "$WITH_GPU" == "ON" ] || [ "$WITH_ROCM" == "ON" ];then parallel_test_base_gpu else diff --git a/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py b/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py index c024ffbdb4b..7320efd259f 100644 --- a/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py @@ -19,7 +19,6 @@ import numpy as np import struct import paddle.fluid.core as core from paddle.fluid.tests.unittests.op_test import OpTest, convert_float_to_uint16 -from paddle.fluid.tests.unittests.op_test import OpTest from paddle.fluid.tests.unittests.test_fusion_gru_op import fusion_gru from paddle.fluid.tests.unittests.test_fusion_lstm_op import fc, ACTIVATION diff --git a/python/paddle/fluid/tests/unittests/test_fusion_gru_op.py b/python/paddle/fluid/tests/unittests/test_fusion_gru_op.py index 1e25b8034da..c241fc65d9b 100644 --- a/python/paddle/fluid/tests/unittests/test_fusion_gru_op.py +++ b/python/paddle/fluid/tests/unittests/test_fusion_gru_op.py @@ -18,8 +18,8 @@ import unittest import numpy as np import math from op_test import OpTest -from test_gru_op import gru -from test_fusion_lstm_op import fc, ACTIVATION +from paddle.fluid.tests.unittests.test_gru_op import gru +from paddle.fluid.tests.unittests.test_fusion_lstm_op import fc, ACTIVATION def fusion_gru( diff --git a/python/paddle/fluid/tests/unittests/test_fusion_lstm_op.py b/python/paddle/fluid/tests/unittests/test_fusion_lstm_op.py index 3928b6fa034..4899927a769 100644 --- a/python/paddle/fluid/tests/unittests/test_fusion_lstm_op.py +++ b/python/paddle/fluid/tests/unittests/test_fusion_lstm_op.py @@ -17,7 +17,7 @@ from __future__ import print_function import unittest import numpy as np from op_test import OpTest -from test_lstm_op import lstm, ACTIVATION +from paddle.fluid.tests.unittests.test_lstm_op import lstm, ACTIVATION def fc(x, w, b): diff --git a/python/paddle/fluid/tests/unittests/test_gru_op.py b/python/paddle/fluid/tests/unittests/test_gru_op.py index 3ea47a5d690..3ec943ef2e0 100644 --- a/python/paddle/fluid/tests/unittests/test_gru_op.py +++ b/python/paddle/fluid/tests/unittests/test_gru_op.py @@ -19,7 +19,7 @@ import numpy as np import math import functools from op_test import OpTest -from test_lstm_op import ACTIVATION +from paddle.fluid.tests.unittests.test_lstm_op import ACTIVATION from paddle import fluid from paddle.fluid import Program, program_guard diff --git a/python/unittest_py/requirements.txt b/python/unittest_py/requirements.txt index 5a59935887b..752f3545c69 100644 --- a/python/unittest_py/requirements.txt +++ b/python/unittest_py/requirements.txt @@ -10,3 +10,4 @@ scipy>=0.19.0, <=1.2.1 ; python_version<"3.5" scipy<=1.3.1 ; python_version=="3.5" scipy ; python_version>"3.5" prettytable +distro diff --git a/tools/summary_env.py b/tools/summary_env.py index 38bae87651d..d12e644cc28 100644 --- a/tools/summary_env.py +++ b/tools/summary_env.py @@ -13,6 +13,7 @@ # limitations under the License. import os import sys +import distro import platform import subprocess @@ -47,8 +48,8 @@ def get_os_info(): plat = "macOs" ver = platform.mac_ver()[0] elif platform.system() == "Linux": - plat = platform.linux_distribution()[0] - ver = platform.linux_distribution()[1] + plat = distro.linux_distribution()[0] + ver = distro.linux_distribution()[1] elif platform.system() == "Windows": plat = "Windows" ver = platform.win32_ver()[0] -- GitLab