Skip to content

Commit

Permalink
Fix vision unit tests infra failures (#7332)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Hug <[email protected]>
  • Loading branch information
atalman and NicolasHug authored Feb 27, 2023
1 parent 126e3e7 commit 6a8a3c0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 34 deletions.
30 changes: 2 additions & 28 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ jobs:
image: ubuntu-2004-cuda-11.4:202110-01
resource_class: gpu.nvidia.medium
environment:
image_name: "pytorch/manylinux-cuda116"
image_name: "pytorch/manylinux-cuda117"
CU_VERSION: << parameters.cu_version >>
PYTHON_VERSION: << parameters.python_version >>
steps:
Expand Down
7 changes: 6 additions & 1 deletion .circleci/regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ def unittest_workflows(indentation=6):
if os_type == "linux" and device_type == "cpu":
continue
for i, python_version in enumerate(PYTHON_VERSIONS):

# Turn off unit tests for 3.11, unit test are not setup properly
if python_version == "3.11":
continue

job = {
"name": f"unittest_{os_type}_{device_type}_py{python_version}",
"python_version": python_version,
Expand Down Expand Up @@ -290,7 +295,7 @@ def cmake_workflows(indentation=6):

job["cu_version"] = "cu117" if device == "gpu" else "cpu"
if device == "gpu" and os_type == "linux":
job["wheel_docker_image"] = "pytorch/manylinux-cuda116"
job["wheel_docker_image"] = "pytorch/manylinux-cuda117"
jobs.append({f"cmake_{os_type}_{device}": job})
return indent(indentation, jobs)

Expand Down
7 changes: 6 additions & 1 deletion .circleci/unittest/linux/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ unset PYTORCH_VERSION
# so no need to set PYTORCH_VERSION.
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.

set -e
set -ex

eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env
Expand Down Expand Up @@ -34,7 +34,12 @@ if [ "${os}" == "MacOSX" ]; then
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}"
else
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}"

# make sure local cuda is set to required cuda version and not CUDA version by default
rm -f /usr/local/cuda
ln -s /usr/local/cuda-${version} /usr/local/cuda
fi


printf "* Installing torchvision\n"
python setup.py develop
4 changes: 2 additions & 2 deletions .circleci/unittest/linux/scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Do not install PyTorch and torchvision here, otherwise they also get cached.

set -e
set -ex

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Avoid error: "fatal: unsafe repository"
Expand Down Expand Up @@ -39,7 +39,7 @@ conda activate "${env_dir}"
# 3. Install Conda dependencies
printf "* Installing dependencies (except PyTorch)\n"
FFMPEG_PIN="=4.2"
if [[ "${PYTHON_VERSION}" = "3.9" ]]; then
if [[ "${PYTHON_VERSION}" == "3.9" ]]; then
FFMPEG_PIN=">=4.2"
fi

Expand Down
2 changes: 1 addition & 1 deletion .circleci/unittest/windows/scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Do not install PyTorch and torchvision here, otherwise they also get cached.

set -e
set -ex

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
Expand Down

0 comments on commit 6a8a3c0

Please sign in to comment.