Skip to content

Commit

Permalink
【CI】support py3.6 in windows-ci pipeline (#42711)
Browse files Browse the repository at this point in the history
* set scipy and numpy version suit for py3.6

* pynacl1.5.0 which is needed by PyGithub built failed in python36, change it to 1.4.0 also works;test=document_fix;test=windows_ci

* np.corrcoef support parameter since 1.20

* delete test code
  • Loading branch information
betterpig authored May 18, 2022
1 parent 29a0a8e commit fa8c755
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion paddle/scripts/paddle_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ set UPLOAD_TP_FILE=OFF
rem ------initialize set git config------
git config --global core.longpaths true


rem ------initialize the python environment------
set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe
set PATH=%PYTHON_ROOT%\Scripts;%PYTHON_ROOT%;%PATH%
Expand Down
6 changes: 6 additions & 0 deletions python/paddle/fluid/tests/unittests/test_corr.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@
import six
import paddle
import warnings
import sys

np_minor_version = int((np.__version__).split('.')[1])


def numpy_corr(np_arr, rowvar=True, dtype='float64'):
# np.corrcoef support parameter 'dtype' since 1.20
if np_minor_version < 20:
return np.corrcoef(np_arr, rowvar=rowvar)
return np.corrcoef(np_arr, rowvar=rowvar, dtype=dtype)


Expand Down
6 changes: 4 additions & 2 deletions python/unittest_py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pynacl==1.4.0 ; python_version == "3.6"
PyGithub
coverage==5.5
pycrypto ; platform_system != "Windows"
Expand All @@ -8,7 +9,8 @@ hypothesis
opencv-python<=4.2.0.32
visualdl
paddle2onnx>=0.8.2
scipy>=1.6
scipy>=1.6; python_version >= "3.7"
scipy>=1.5; python_version == "3.6"
prettytable
distro
numpy>=1.20,<1.22
numpy>=1.20,<1.22; python_version >= "3.7"

0 comments on commit fa8c755

Please sign in to comment.