Revision 542694fb90398031d2fa3d3ab974e460d8278f2c authored by Amanpreet Singh on 29 March 2021, 17:03:21 UTC, committed by Facebook GitHub Bot on 29 March 2021, 17:04:37 UTC
Summary: Pull Request resolved: https://github.com/facebookresearch/mmf/pull/834 Without proper teardown, the job might fail as errored and restart. This diff adds proper teardown support for datamodules which inherently will include onbox dataloader as well. Reviewed By: ytsheng, vedanuj Differential Revision: D26687357 fbshipit-source-id: 8cebc7f49055cea6906cb367b539fc4073666493
1 parent 12650f5
config.yml
# Use 2.1 for orbs
version: 2.1
# -------------------------------------------------------------------------------------
# Environments to run the jobs in
# -------------------------------------------------------------------------------------
gpu: &gpu
environment:
CUDA_VERSION: "10.2"
machine:
image: ubuntu-1604:201903-01
resource_class: gpu.medium
# -------------------------------------------------------------------------------------
# Re-usable commands
# -------------------------------------------------------------------------------------
cache_key: &cache_key cache-key-{{ .Environment.CIRCLE_JOB }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "setup.py"}}-{{ checksum "requirements.txt"}}
install_dep: &install_dep
- run:
name: Install Dependencies
command: |
source activate mmf
pip install --upgrade setuptools
pip install --upgrade torch torchvision
pip install --progress-bar off flake8==3.7.9
pip install --progress-bar off black==19.3b0
pip install --progress-bar off isort==4.3.21
pip install --progress-bar off pytest
pip install --progress-bar off fairscale==0.1.7
python setup.py clean --all
python setup.py install
python -c 'import torch; print("Torch version:", torch.__version__)'
python -m torch.utils.collect_env
install_repo: &install_repo
- run:
name: Install Repository
command: |
source activate mmf
python setup.py build develop
run_unittests: &run_unittests
- run:
name: Run Unit Tests
command: |
source activate mmf
cd tests
pytest --junitxml=test-results/junit.xml -v .
install_nvidia_driver: &install_nvidia_driver
- run:
name: Install NVIDIA Driver
working_directory: ~/
command: |
wget -q --no-clobber -P ~/nvidia-downloads 'https://pytorch-ci-utils.s3.us-east-2.amazonaws.com/nvidia-drivers/NVIDIA-Linux-x86_64-440.64.run'
sudo /bin/bash ~/nvidia-downloads/NVIDIA-Linux-x86_64-440.64.run -s --no-drm
pyenv versions
nvidia-smi
pyenv global 3.7.0
create_conda_env: &create_conda_env
- run:
name: Install and Create Conda Environment
command: |
curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x ~/miniconda.sh
~/miniconda.sh -b -p $HOME/miniconda
rm ~/miniconda.sh
echo 'export PATH=$HOME/miniconda/bin:$PATH' >> $BASH_ENV
source $BASH_ENV
if [ ! -d ~/miniconda/envs/mmf ]
then
conda create -y -n mmf python=3.7
fi
source activate mmf
python --version
which python
which pip
pip install --upgrade pip
# -------------------------------------------------------------------------------------
# Jobs to run
# -------------------------------------------------------------------------------------
jobs:
# GPU config initially taken from detectron2
gpu_tests:
<<: *gpu
working_directory: ~/mmf
steps:
- checkout
# Cache the nvidia driver downloads
- restore_cache:
key: nvidia-downloads-v4
- <<: *install_nvidia_driver
- save_cache:
key: nvidia-downloads-v4
paths:
- "~/nvidia-downloads/"
- <<: *create_conda_env
- restore_cache:
key: *cache_key
- <<: *install_dep
# Cache the miniconda directory that contains dependencies
- save_cache:
paths:
- ~/miniconda/
key: *cache_key
- <<: *install_repo
- <<: *run_unittests
- store_test_results:
path: tests/test-results
workflows:
version: 2
build:
jobs:
- gpu_tests
Computing file changes ...