Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Add pyt16 and 1.9 to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iseessel committed Oct 12, 2021
1 parent 288862a commit 223b6bf
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 8 deletions.
98 changes: 91 additions & 7 deletions .circleci/config.yml
Expand Up @@ -98,12 +98,26 @@ pip_list: &pip_list
command: |
pip list
install_pyt_19: &install_pyt_19
- run:
name: Install Pytorch version 1.9
working_directory: ~/vissl
command: |
pip install --progress-bar off torch==1.9.1 torchvision==0.10.1 opencv-python==3.4.2.17
install_pyt_16: &install_pyt_16
- run:
name: Install Pytorch version 1.6
working_directory: ~/vissl
command: |
pip install --progress-bar off torch==1.6.0 torchvision==0.7.0 opencv-python==3.4.2.17
install_vissl_dep: &install_vissl_dep
- run:
name: Install Dependencies
working_directory: ~/vissl
command: |
pip install --progress-bar off torch==1.7.1 torchvision==0.8.2 opencv-python==3.4.2.17
pip install --progress-bar off -r requirements.txt
# Update this since classy_vision seems to need it.
pip install --progress-bar off --upgrade iopath
Expand Down Expand Up @@ -137,11 +151,12 @@ run_unittests: &run_unittests
command: |
python -m unittest discover -v -s tests
# -------------------------------------------------------------------------------------
# Jobs to run (cpu and gpu)
# -------------------------------------------------------------------------------------
jobs:
cpu_tests:
pyt16_cpu_tests:
<<: *cpu

working_directory: ~/vissl
Expand All @@ -154,8 +169,9 @@ jobs:
# Cache the vissl_venv directory that contains dependencies
- restore_cache:
keys:
- v5-cpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}
- v5-pyt16-cpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}

- <<: *install_pyt_16
- <<: *install_vissl_dep
- <<: *install_classy_vision
- <<: *install_apex_cpu
Expand All @@ -164,7 +180,7 @@ jobs:
- save_cache:
paths:
- ~/vissl_venv
key: v5-cpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}
key: v5-pyt16-cpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}

- <<: *install_vissl

Expand All @@ -183,7 +199,74 @@ jobs:
- <<: *run_unittests

gpu_tests:
pyt16_gpu_tests:
<<: *gpu

working_directory: ~/vissl

steps:
- checkout
- <<: *setupcuda
- <<: *install_python
- <<: *setup_venv

# Download and cache dependencies
- restore_cache:
keys:
- v5-pyt16-gpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}-{{ checksum "docker/common/install_apex.sh" }}

- <<: *install_pyt_16
- <<: *install_vissl_dep
- <<: *install_classy_vision
- <<: *update_gcc7
- <<: *install_apex_gpu
- <<: *pip_list

- run:
name: Check CUDA Available
command: python -c "import torch; assert torch.cuda.is_available(), 'CUDA not available'"

- save_cache:
paths:
- ~/vissl_venv
key: v5-pyt16-gpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}-{{ checksum "docker/common/install_apex.sh" }}

- <<: *install_vissl

- run:
name: Run GPU tests
command: bash ./dev/run_quick_tests.sh

pyt19_cpu_tests:
<<: *cpu

working_directory: ~/vissl

steps:
- checkout
- <<: *install_python
- <<: *setup_venv

# Cache the vissl_venv directory that contains dependencies
- restore_cache:
keys:
- v5-pyt16-cpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}

- <<: *install_pyt_19
- <<: *install_vissl_dep
- <<: *install_classy_vision
- <<: *install_apex_cpu
- <<: *pip_list

- save_cache:
paths:
- ~/vissl_venv
key: v5-pyt19-cpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}

- <<: *install_vissl
- <<: *run_unittests

pyt19_gpu_tests:
<<: *gpu

working_directory: ~/vissl
Expand All @@ -197,8 +280,9 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- v5-gpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}-{{ checksum "docker/common/install_apex.sh" }}
- v5-pyt16-gpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}-{{ checksum "docker/common/install_apex.sh" }}

- <<: *install_pyt_19
- <<: *install_vissl_dep
- <<: *install_classy_vision
- <<: *update_gcc7
Expand All @@ -212,7 +296,7 @@ jobs:
- save_cache:
paths:
- ~/vissl_venv
key: v5-gpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}-{{ checksum "docker/common/install_apex.sh" }}
key: v5-pyt19-gpu-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}-{{ checksum "docker/common/install_apex.sh" }}

- <<: *install_vissl

Expand Down
2 changes: 1 addition & 1 deletion dev/packaging/apex_conda/inside/build.py
Expand Up @@ -110,7 +110,7 @@ def pytorch_versions_for_python(python_version):

try:
subprocess.check_call(args)
except:
except Exception:
print(f"Package: {apex_file_name} failed to build. Continuing...")
continue

Expand Down

0 comments on commit 223b6bf

Please sign in to comment.