Skip to content

Commit

Permalink
Only dump cache if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nemo committed Jan 20, 2025
1 parent f0cabe0 commit e350946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: |
SHASUM=sha256sum
[ -f "$(which shasum)" ] && SHASUM=shasum
find "${{ env.HF_HOME }}/hub" -type f -exec "$SHASUM" {} \; > cache_content_initial
[ -d "${{ env.HF_HOME }}/hub" ] && find "${{ env.HF_HOME }}/hub" -type f -exec "$SHASUM" {} \; > cache_content_initial
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
run: |
SHASUM=sha256sum
[ -f "$(which shasum)" ] && SHASUM=shasum
find "${{ env.HF_HOME }}/hub" -type f -exec "$SHASUM" {} \; > cache_content_after
[ -d "${{ env.HF_HOME }}/hub" ] && find "${{ env.HF_HOME }}/hub" -type f -exec "$SHASUM" {} \; > cache_content_after
diff -udp cache_content_initial cache_content_after || true
- name: Delete old model cache entries
run: |
Expand Down

0 comments on commit e350946

Please sign in to comment.