Skip to content

Commit 1708120

Browse files
Revert "[CI] Move Windows build/tests to Python-3.10 (pytorch#162862)"
This reverts commit 2dcd153. Reverted pytorch#162862 on behalf of https://github.com/malfet due to Breaks some windows tests ([comment](pytorch#162862 (comment)))
1 parent 5780478 commit 1708120

File tree

6 files changed

+13
-33
lines changed

6 files changed

+13
-33
lines changed

.ci/pytorch/win-test-helpers/installation-helpers/activate_miniconda3.bat

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ if "%BUILD_ENVIRONMENT%"=="" (
33
) else (
44
set CONDA_PARENT_DIR=C:\Jenkins
55
)
6-
set CONDA_ROOT_DIR=%CONDA_PARENT_DIR%\Miniconda3
6+
77

88
:: Be conservative here when rolling out the new AMI with conda. This will try
99
:: to install conda as before if it couldn't find the conda installation. This
1010
:: can be removed eventually after we gain enough confidence in the AMI
11-
if not exist %CONDA_ROOT_DIR% (
11+
if not exist %CONDA_PARENT_DIR%\Miniconda3 (
1212
set INSTALL_FRESH_CONDA=1
1313
)
1414

@@ -17,14 +17,10 @@ if "%INSTALL_FRESH_CONDA%"=="1" (
1717
if errorlevel 1 exit /b
1818
if not errorlevel 0 exit /b
1919

20-
%TMP_DIR_WIN%\Miniconda3-latest-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /AddToPath=0 /D=%CONDA_ROOT_DIR%
20+
%TMP_DIR_WIN%\Miniconda3-latest-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /AddToPath=0 /D=%CONDA_PARENT_DIR%\Miniconda3
2121
if errorlevel 1 exit /b
2222
if not errorlevel 0 exit /b
2323
)
2424

2525
:: Activate conda so that we can use its commands, i.e. conda, python, pip
26-
call %CONDA_ROOT_DIR%\Scripts\activate.bat %CONDA_ROOT_DIR%
27-
:: Activate conda so that we can use its commands, i.e. conda, python, pip
28-
call conda activate py_tmp
29-
30-
call pip install -r requirements.txt
26+
call %CONDA_PARENT_DIR%\Miniconda3\Scripts\activate.bat %CONDA_PARENT_DIR%\Miniconda3

.ci/pytorch/win-test-helpers/setup_pytorch_env.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if not errorlevel 0 exit /b
1414
:: build\torch. Rather than changing all these references, making a copy of torch folder
1515
:: from conda to the current workspace is easier. The workspace will be cleaned up after
1616
:: the job anyway
17-
xcopy /s %CONDA_ROOT_DIR%\envs\py_tmp\Lib\site-packages\torch %TMP_DIR_WIN%\build\torch\
17+
xcopy /s %CONDA_PARENT_DIR%\Miniconda3\Lib\site-packages\torch %TMP_DIR_WIN%\build\torch\
1818

1919
pushd .
2020
if "%VC_VERSION%" == "" (

.ci/pytorch/win-test.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,7 @@ if [[ "$BUILD_ENVIRONMENT" == *cuda* ]]; then
3838
fi
3939

4040
# TODO: Move both of them to Windows AMI
41-
python -m pip install tensorboard==2.13.0 protobuf==5.29.4 pytest-subtests==0.13.1
42-
43-
# Copied from https://github.com/pytorch/test-infra/blob/be01a40157c36cd5a48391fdf44a7bc3ebd4c7e3/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1#L16 with some adjustments
44-
# pytest-rerunfailures==10.3 as 10.2 fails with INTERNALERROR> pluggy._manager.PluginValidationError: unknown hook 'pytest_configure_node'
45-
# scipy from 1.6.3 to 1.10
46-
# expecttest from 0.1.3 to 0.3.0
47-
python -m pip install "future==0.18.2" "hypothesis==5.35.1" "expecttest==0.3.0" "librosa>=0.6.2" "scipy==1.10.1" "psutil==5.9.1" "pynvml==11.4.1" "pillow==9.2.0" "unittest-xml-reporting<=3.2.0,>=2.0.0" "pytest==7.1.3" "pytest-xdist==2.5.0" "pytest-flakefinder==1.1.0" "pytest-rerunfailures==10.3" "pytest-shard==0.1.2" "sympy==1.11.1" "xdoctest==1.0.2" "pygments==2.12.0" "opt-einsum>=3.3" "networkx==2.8.8" "mpmath==1.2.1" "pytest-cpp==2.3.0"
41+
python -m pip install pytest-rerunfailures==10.3 pytest-cpp==2.3.0 tensorboard==2.13.0 protobuf==5.29.4 pytest-subtests==0.13.1
4842

4943
# Install Z3 optional dependency for Windows builds.
5044
python -m pip install z3-solver==4.15.1.0
@@ -58,6 +52,9 @@ python -m pip install parameterized==0.8.1
5852
# Install pulp for testing ilps under torch\distributed\_tools
5953
python -m pip install pulp==2.9.0
6054

55+
# Install expecttest to merge https://github.com/pytorch/pytorch/pull/155308
56+
python -m pip install expecttest==0.3.0
57+
6158
run_tests() {
6259
# Run nvidia-smi if available
6360
for path in '/c/Program Files/NVIDIA Corporation/NVSMI/nvidia-smi.exe' /c/Windows/System32/nvidia-smi.exe; do

.github/actions/setup-win/action.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ inputs:
66
cuda-version:
77
description: which cuda version to install, 'cpu' for none
88
required: true
9-
python-version:
10-
required: false
11-
type: string
12-
default: "3.10"
13-
description: |
14-
The python version to be used. Will be 3.10 by default
159

1610
runs:
1711
using: composite
@@ -44,24 +38,18 @@ runs:
4438
CONDA="C:\Jenkins\Miniconda3\condabin\conda.bat"
4539
4640
{
47-
echo "CONDA=${CONDA}";
4841
echo "CONDA_RUN=${CONDA} run --no-capture-output";
4942
echo "CONDA_BUILD=${CONDA} run conda-build";
5043
echo "CONDA_INSTALL=${CONDA} install";
5144
} >> "${GITHUB_ENV}"
5245
5346
- name: Setup Python3
54-
env:
55-
PYTHON_VERSION: ${{ inputs.python-version }}
5647
shell: bash
5748
run: |
5849
set +e
5950
set -x
6051
61-
# Create new py_tmp env with python-version
62-
${CONDA} create -y -n py_tmp python=${PYTHON_VERSION} intel-openmp
63-
64-
PYTHON3=$(${CONDA_RUN} -n py_tmp which python3)
52+
PYTHON3=$(${CONDA_RUN} which python3)
6553
EXIT_CODE=$?
6654
6755
if [[ "${EXIT_CODE}" == "0" ]]; then
@@ -74,7 +62,7 @@ runs:
7462
# installation, which is Python 3 based. Its Python is default to Python 3. Further, there
7563
# is also the Miniconda installation that is Python 2 based, and both can be installed if
7664
# needed. In both cases, Python binary is just called python
77-
PYTHON=$(${CONDA_RUN} -n py_tmp which python)
65+
PYTHON=$(${CONDA_RUN} which python)
7866
EXIT_CODE=$?
7967
8068
if [[ "${EXIT_CODE}" == "0" ]]; then

.github/workflows/_win-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
BUILD_WHEEL: 1
152152
MAX_JOBS: 8
153153
CUDA_VERSION: ${{ inputs.cuda-version }}
154-
PYTHON_VERSION: "3.10"
154+
PYTHON_VERSION: "3.9"
155155
SCCACHE_BUCKET: "ossci-compiler-cache"
156156
SCCACHE_S3_KEY_PREFIX: ${{ github.workflow }}
157157
SCCACHE_REGION: us-east-1

.github/workflows/_win-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ jobs:
184184
env:
185185
USE_CUDA: ${{ inputs.cuda-version != 'cpu' && '1' || '0' }}
186186
INSTALL_WINDOWS_SDK: 1
187-
PYTHON_VERSION: "3.10"
187+
PYTHON_VERSION: 3.9
188188
CONTINUE_THROUGH_ERROR: ${{ steps.keep-going.outputs.keep-going }}
189189
VERBOSE_TEST_LOGS: ${{ steps.keep-going.outputs.ci-verbose-test-logs }}
190190
TEST_SHOWLOCALS: ${{ steps.keep-going.outputs.ci-test-showlocals }}
@@ -217,7 +217,6 @@ jobs:
217217
PYTORCH_TEST_CUDA_MEM_LEAK_CHECK: ${{ matrix.mem_leak_check && '1' || '0' }}
218218
PYTORCH_TEST_RERUN_DISABLED_TESTS: ${{ matrix.rerun_disabled_tests && '1' || '0' }}
219219
run: |
220-
which python3
221220
pushd "${PYTORCH_FINAL_PACKAGE_DIR}"
222221
# shellcheck disable=SC2046,SC2102
223222
python3 -mpip install $(echo *.whl)[opt-einsum,optree] optree==0.13.0

0 commit comments

Comments
 (0)