From 0c1e9391de36c30a366505261edceca89931b561 Mon Sep 17 00:00:00 2001 From: Michele Dolfi <97102151+dolfim-ibm@users.noreply.github.com> Date: Mon, 3 Mar 2025 00:13:47 +0100 Subject: [PATCH] chore: use gh cache for huggingface models (#1096) * use gh cache for huggingface models Signed-off-by: Michele Dolfi * increase hf timeout Signed-off-by: Michele Dolfi * more timeout Signed-off-by: Michele Dolfi * use different cache key in each job Signed-off-by: Michele Dolfi --------- Signed-off-by: Michele Dolfi --- .github/workflows/checks.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1c322d9..b2a295d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,6 +1,10 @@ on: workflow_call: +env: + HF_HUB_DOWNLOAD_TIMEOUT: "60" + HF_HUB_ETAG_TIMEOUT: "60" + jobs: run-checks: runs-on: ubuntu-latest @@ -14,6 +18,11 @@ jobs: - name: Set TESSDATA_PREFIX run: | echo "TESSDATA_PREFIX=$(dpkg -L tesseract-ocr-eng | grep tessdata$)" >> "$GITHUB_ENV" + - name: Cache Hugging Face models + uses: actions/cache@v4 + with: + path: ~/.cache/huggingface + key: huggingface-cache-py${{ matrix.python-version }} - uses: ./.github/actions/setup-poetry with: python-version: ${{ matrix.python-version }}