Skip to content

Commit 8ed90f9

Browse files
committed
ci: try update caching
1 parent 865b426 commit 8ed90f9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/cpu-tests.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,16 @@ jobs:
7070
cache: "pip"
7171
cache-dependency-path: pyproject.toml
7272

73-
# Add caching for HF models and datasets
73+
# Add caching for HF models and tokenizers
7474
- name: Restore HF cache
75-
continue-on-error: true
7675
uses: actions/cache/restore@v3
7776
with:
7877
path: .cache-HF
79-
key: ${{ runner.os }}-huggingface
78+
key: |
79+
hf-cache-${{ runner.os }}-${{ matrix.python-version }}
80+
hf-cache-${{ runner.os }}-
81+
hf-cache-
82+
fail-on-cache-miss: false
8083

8184
- name: Install dependencies
8285
run: |
@@ -95,11 +98,10 @@ jobs:
9598
9699
- name: Dump HF cache
97100
if: github.event_name != 'pull_request'
98-
continue-on-error: true
99101
uses: actions/cache/save@v3
100102
with:
101103
path: .cache-HF
102-
key: ${{ runner.os }}-huggingface
104+
key: hf-cache-${{ runner.os }}-${{ matrix.python-version }}
103105

104106
testing-guardian:
105107
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)