Skip to content

Commit cb2019b

Browse files
committed
"Fix" PyTorch CPU conda testing
It's still horribly broken, but make it a bit better by not installing pytorch from default anaconda channel (which installs 1.12.1 that does not have any dependencies 2.0 dev package supposed to have) For example, see this runlog https://github.com/pytorch/pytorch/actions/runs/4155371267/jobs/7189101147
1 parent cb27008 commit cb2019b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

windows/internal/smoke_test.bat

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ echo "install conda package"
6464
set "CONDA_HOME=%CD%\conda"
6565
set "tmp_conda=%CONDA_HOME%"
6666
set "miniconda_exe=%CD%\miniconda.exe"
67-
set "CONDA_EXTRA_ARGS="
67+
set "CONDA_EXTRA_ARGS=cpuonly -c pytorch-nightly"
6868
if "%CUDA_VERSION%" == "116" (
6969
set "CONDA_EXTRA_ARGS=pytorch-cuda=11.6 -c nvidia -c pytorch-nightly"
7070
)
@@ -102,15 +102,6 @@ set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR%
102102
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.tar.bz2') do call conda install -yq "%%i" --offline
103103
if ERRORLEVEL 1 exit /b 1
104104

105-
if "%CUDA_VERSION%" == "cpu" goto install_cpu_torch
106-
107-
goto smoke_test
108-
109-
:install_cpu_torch
110-
call conda install %CONDA_EXTRA_ARGS% -y cpuonly -c pytorch-nightly
111-
if ERRORLEVEL 1 exit /b 1
112-
113-
:smoke_test
114105
python -c "import torch"
115106
if ERRORLEVEL 1 exit /b 1
116107

0 commit comments

Comments
 (0)