Skip to content

Commit cb9c8c5

Browse files
committed
[BugFix,CI] Fix Windows CI (#1983)
1 parent d56730a commit cb9c8c5

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed

Diff for: .github/unittest/windows_optdepts/scripts/install.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ git submodule sync && git submodule update --init --recursive
4141
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
4242
if [[ "$TORCH_VERSION" == "nightly" ]]; then
4343
if $torch_cuda ; then
44-
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
44+
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118
4545
else
4646
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
4747
fi
4848
elif [[ "$TORCH_VERSION" == "stable" ]]; then
4949
if $torch_cuda ; then
50-
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
50+
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118
5151
else
52-
pip3 install torch --index-url https://download.pytorch.org/whl/cu121
52+
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
5353
fi
5454
else
5555
printf "Failed to install pytorch"

Diff for: .github/workflows/test-windows-optdepts.yml

+44-44
Original file line numberDiff line numberDiff line change
@@ -55,47 +55,47 @@ jobs:
5555
## post_process.sh
5656
./.github/unittest/windows_optdepts/scripts/post_process.sh
5757
58-
unittests-gpu:
59-
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
60-
with:
61-
runner: "windows.g5.4xlarge.nvidia.gpu"
62-
repository: pytorch/rl
63-
timeout: 40
64-
script: |
65-
set -euxo pipefail
66-
67-
export PYTHON_VERSION="3.9"
68-
export CUDA_VERSION="11.6"
69-
export CU_VERSION="cu116"
70-
export torch_cuda="True"
71-
72-
# TODO: Port this to pytorch/test-infra/.github/workflows/windows_job.yml
73-
export PATH="/c/Jenkins/Miniconda3/Scripts:${PATH}"
74-
75-
echo "PYTHON_VERSION: $PYTHON_VERSION"
76-
77-
if [[ "${{ github.ref }}" =~ release/* ]]; then
78-
export RELEASE=1
79-
export TORCH_VERSION=stable
80-
else
81-
export RELEASE=0
82-
export TORCH_VERSION=nightly
83-
fi
84-
85-
## setup_env.sh
86-
./.github/unittest/windows_optdepts/scripts/setup_env.sh
87-
88-
## Install CUDA
89-
packaging/windows/internal/cuda_install.bat
90-
91-
## Update CUDA Driver
92-
packaging/windows/internal/driver_update.bat
93-
94-
## install.sh
95-
./.github/unittest/windows_optdepts/scripts/install.sh
96-
97-
## run_test.sh
98-
./.github/unittest/windows_optdepts/scripts/run_test.sh
99-
100-
## post_process.sh
101-
./.github/unittest/windows_optdepts/scripts/post_process.sh
58+
# unittests-gpu:
59+
# uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
60+
# with:
61+
# runner: "windows.g5.4xlarge.nvidia.gpu"
62+
# repository: pytorch/rl
63+
# timeout: 40
64+
# script: |
65+
# set -euxo pipefail
66+
#
67+
# export PYTHON_VERSION="3.9"
68+
# export CUDA_VERSION="11.6"
69+
# export CU_VERSION="cu116"
70+
# export torch_cuda="True"
71+
#
72+
# # TODO: Port this to pytorch/test-infra/.github/workflows/windows_job.yml
73+
# export PATH="/c/Jenkins/Miniconda3/Scripts:${PATH}"
74+
#
75+
# echo "PYTHON_VERSION: $PYTHON_VERSION"
76+
#
77+
# if [[ "${{ github.ref }}" =~ release/* ]]; then
78+
# export RELEASE=1
79+
# export TORCH_VERSION=stable
80+
# else
81+
# export RELEASE=0
82+
# export TORCH_VERSION=nightly
83+
# fi
84+
#
85+
# ## setup_env.sh
86+
# ./.github/unittest/windows_optdepts/scripts/setup_env.sh
87+
#
88+
# ## Install CUDA
89+
# packaging/windows/internal/cuda_install.bat
90+
#
91+
# ## Update CUDA Driver
92+
# packaging/windows/internal/driver_update.bat
93+
#
94+
# ## install.sh
95+
# ./.github/unittest/windows_optdepts/scripts/install.sh
96+
#
97+
# ## run_test.sh
98+
# ./.github/unittest/windows_optdepts/scripts/run_test.sh
99+
#
100+
# ## post_process.sh
101+
# ./.github/unittest/windows_optdepts/scripts/post_process.sh

0 commit comments

Comments
 (0)