Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
ci: cashing transformers
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jun 18, 2023
1 parent 4c2790a commit 42cbeab
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ defaults:
shell: bash

jobs:
pytester:

pytester:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -53,6 +53,7 @@ jobs:
env:
FREEZE_REQUIREMENTS: 1
TORCH_URL: https://download.pytorch.org/whl/cpu/torch_stable.html
TRANSFORMERS_CACHE: _hf_cache

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -115,6 +116,12 @@ jobs:
-f https://data.pyg.org/whl/torch-1.13.1+cpu.html # this extra URL is for graph extras
pip list
- name: Restore HF cache
uses: actions/cache/restore@v3
with:
path: ${{ env.TRANSFORMERS_CACHE }}
key: cache-transformers

- name: DocTests
working-directory: src/
run: |
Expand All @@ -136,13 +143,6 @@ jobs:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-dependencies

- name: Cache datasets
uses: actions/cache@v3
with:
path: data # This path is specific to Ubuntu
key: flash-datasets-${{ hashFiles('tests/examples/test_scripts.py') }}
restore-keys: flash-datasets-

- name: Testing
run: |
coverage run --source flash -m pytest \
Expand All @@ -153,6 +153,12 @@ jobs:
tests/${{ matrix.topic }} \
-v # --reruns 3 --reruns-delay 2
- name: Save HF cache
uses: actions/cache/save@v3
with:
path: ${{ env.TRANSFORMERS_CACHE }}
key: cache-transformers

- name: Statistics
run: |
coverage report
Expand Down

0 comments on commit 42cbeab

Please sign in to comment.