Skip to content

Commit

Permalink
CI: set HF caching (#691)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Stancl <46073029+stancld@users.noreply.github.com>
  • Loading branch information
Borda and stancld committed Dec 22, 2021
1 parent 67f78ab commit 63d0d75
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci_test-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
matrix:
os: [ubuntu-20.04, windows-2019, macOS-10.15]
python-version: [3.7]
env:
TRANSFORMERS_CACHE: .cache/huggingface/

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 20
Expand Down Expand Up @@ -64,6 +66,12 @@ jobs:
pip list
shell: bash

- name: HF cache
uses: actions/cache@v2
with:
path: $TRANSFORMERS_CACHE
key: cache-transformers

- name: Test Package [only]
run: |
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci_test-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
include:
- python-version: 3.7
pytorch-version: '1.3'
env:
TRANSFORMERS_CACHE: .cache/huggingface/

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 55
Expand Down Expand Up @@ -60,6 +62,12 @@ jobs:
# prevent hanging Conda creations
timeout-minutes: 10

- name: HF cache
uses: actions/cache@v2
with:
path: $TRANSFORMERS_CACHE
key: cache-transformers

- name: Temp COCO env. fix
if: matrix.pytorch-version == '1.4'
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci_test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
requires: 'latest'
- python-version: 3.9
requires: 'oldest'
env:
TRANSFORMERS_CACHE: .cache/huggingface/

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 75
Expand Down Expand Up @@ -88,6 +90,12 @@ jobs:
pip list
shell: bash

- name: HF cache
uses: actions/cache@v2
with:
path: $TRANSFORMERS_CACHE
key: cache-transformers

- name: Tests
run: |
phmdoctest README.md --outfile tests/test_readme.py
Expand Down

0 comments on commit 63d0d75

Please sign in to comment.