Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] run tests on PyTorch 1.6.0 and gpu tests on 1.6.0 and 1.5.1 #34

Merged
3 commits merged into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 53 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ setup_venv: &setup_venv
which pip
pip install --upgrade pip

install_dep: &install_dep
install_dep_15: &install_dep_15
- run:
name: Install Dependencies
command: |
Expand All @@ -47,6 +47,15 @@ install_dep: &install_dep
python -c 'import torch; print("Torch version:", torch.__version__)'
python -m torch.utils.collect_env

install_dep_16: &install_dep_16
- run:
name: Install Dependencies
command: |
pip install --progress-bar off torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
pip install --progress-bar off -r requirements-test.txt
python -c 'import torch; print("Torch version:", torch.__version__)'
python -m torch.utils.collect_env

install_repo_cpu: &install_repo_cpu
- run:
name: Install Repository
Expand Down Expand Up @@ -97,7 +106,7 @@ jobs:
keys:
- cache-key-cpu-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}

- <<: *install_dep
- <<: *install_dep_15

- save_cache:
paths:
Expand Down Expand Up @@ -128,7 +137,40 @@ jobs:
- store_test_results:
path: test-results

gpu_tests:
gpu_tests_15:
<<: *gpu

working_directory: ~/fairscale

steps:
- checkout

- run: nvidia-smi

- run: pyenv global 3.7.0

- <<: *setup_venv

# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-gpu15-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}

- <<: *install_dep_15

- save_cache:
paths:
- ~/venv
key: cache-key-gpu15-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}

- <<: *install_repo_gpu

- <<: *run_unittests

- store_test_results:
path: test-results

gpu_tests_16:
<<: *gpu

working_directory: ~/fairscale
Expand All @@ -145,14 +187,14 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-gpu-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}
- cache-key-gpu16-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}

- <<: *install_dep
- <<: *install_dep_16

- save_cache:
paths:
- ~/venv
key: cache-key-gpu-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}
key: cache-key-gpu16-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}

- <<: *install_repo_gpu

Expand All @@ -178,14 +220,14 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-gpu-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}
- cache-key-gpu16-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}

- <<: *install_dep
- <<: *install_dep_16

- save_cache:
paths:
- ~/venv
key: cache-key-gpu-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}
key: cache-key-gpu16-{{ checksum "setup.py"}}-{{ checksum "requirements-test.txt"}}

- <<: *install_repo_gpu

Expand All @@ -197,5 +239,6 @@ workflows:
build:
jobs:
- cpu_tests
- gpu_tests
- gpu_tests_15
- gpu_tests_16
- benchmarks
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ mypy == 0.770
pytest == 5.4.1
pytest-cov == 2.10.0
torchtext == 0.6.0
torch == 1.5.1
torch >= 1.5.1
# NOTE(msb) not a dependency but needed by torch
numpy == 1.17.4