Skip to content
Snippets Groups Projects
Unverified Commit 7eb3da12 authored by Oleksandr's avatar Oleksandr Committed by GitHub
Browse files

Added ccache to CI and fixed PyTorch caching. (#161)

* fixed PyTorch caching
* added ccache to CI
* broke habitat api step on installation and testing to save extra 5 min on saving cache in parallel
* testing time drops from first run to second run from 17.5 minutes to 9 minutes (2x times) for full testing.
parent 73237787
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,7 @@ jobs: ...@@ -89,7 +89,7 @@ jobs:
export PATH=$HOME/miniconda/bin:$PATH export PATH=$HOME/miniconda/bin:$PATH
conda create -y -n habitat python=3.6 conda create -y -n habitat python=3.6
. activate habitat . activate habitat
conda install -q -y -c conda-forge ninja numpy pytest conda install -q -y -c conda-forge ninja ccache numpy pytest
fi fi
- run: - run:
name: Install pytorch name: Install pytorch
...@@ -107,6 +107,19 @@ jobs: ...@@ -107,6 +107,19 @@ jobs:
- restore_cache: - restore_cache:
keys: keys:
- habitat-sim-{{ checksum "./hsim_sha" }} - habitat-sim-{{ checksum "./hsim_sha" }}
- restore_cache:
keys:
- ccache-{{ arch }}-master
paths:
- /home/circleci/.ccache
- run:
name: CCache initialization
command: |
export PATH=$HOME/miniconda/bin:$PATH
. activate habitat;
ccache --show-stats
ccache --zero-stats
ccache --max-size=10.0G
- run: - run:
name: Build, install habitat-sim and run benchmark name: Build, install habitat-sim and run benchmark
no_output_timeout: 20m no_output_timeout: 20m
...@@ -127,11 +140,13 @@ jobs: ...@@ -127,11 +140,13 @@ jobs:
python setup.py install --headless python setup.py install --headless
fi fi
fi fi
- save_cache: - run:
key: conda-{{ checksum "habitat-api/.circleci/config.yml" }} name: Ccache stats
background: true when: always
paths: command: |
- ~/miniconda export PATH=$HOME/miniconda/bin:$PATH
. activate habitat;
ccache --show-stats
- run: - run:
name: Download test data name: Download test data
command: | command: |
...@@ -152,10 +167,16 @@ jobs: ...@@ -152,10 +167,16 @@ jobs:
python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD python examples/example.py --scene data/scene_datasets/habitat-test-scenes/van-gogh-room.glb --silent --test_fps_regression $FPS_THRESHOLD
- save_cache: - save_cache:
key: habitat-sim-{{ checksum "./hsim_sha" }} key: habitat-sim-{{ checksum "./hsim_sha" }}
background: true
paths: paths:
- ./habitat-sim - ./habitat-sim
- save_cache:
key: ccache-{{ arch }}-master
background: true
paths:
- /home/circleci/.ccache
- run: - run:
name: Run api tests name: Install api
command: | command: |
export PATH=$HOME/miniconda/bin:$PATH export PATH=$HOME/miniconda/bin:$PATH
. activate habitat; cd habitat-api . activate habitat; cd habitat-api
...@@ -163,13 +184,20 @@ jobs: ...@@ -163,13 +184,20 @@ jobs:
ln -s ../habitat-sim/data data ln -s ../habitat-sim/data data
pip install -r requirements.txt --progress-bar off pip install -r requirements.txt --progress-bar off
touch ~/miniconda/pip_deps_installed touch ~/miniconda/pip_deps_installed
python setup.py test
python setup.py develop --all
python -u habitat_baselines/train_ppo.py --log-file "train.log" --checkpoint-folder "data/checkpoints" --sim-gpu-id 0 --pth-gpu-id 0 --num-processes 1 --num-mini-batch 1 --num-updates 10
- save_cache: - save_cache:
key: conda-{{ checksum "habitat-api/.circleci/config.yml" }} key: conda-{{ checksum "habitat-api/.circleci/config.yml" }}
background: true
paths: paths:
- ~/miniconda - ~/miniconda
- run:
name: Run api tests
command: |
export PATH=$HOME/miniconda/bin:$PATH
. activate habitat; cd habitat-api
python setup.py test
python setup.py develop --all
python -u habitat_baselines/train_ppo.py --log-file "train.log" --checkpoint-folder "data/checkpoints" --sim-gpu-id 0 --pth-gpu-id 0 --num-processes 1 --num-mini-batch 1 --num-updates 10
workflows: workflows:
version: 2 version: 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment