Skip to content

Commit 6e3c2db

Browse files
authored
[CI] [GHA] Use HF cache in PyTorch models/layer tests (#32273)
1 parent 3a9843e commit 6e3c2db

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/job_pytorch_layer_tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ permissions: read-all
2626
env:
2727
PIP_CACHE_PATH_LINUX: /mount/caches/pip/linux
2828
PIP_CACHE_PATH_WIN: "C:\\mount\\caches\\pip\\win"
29+
HF_HUB_CACHE_LIN: /mount/caches/huggingface
30+
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
2931

3032
jobs:
3133
PyTorch_Layer_Tests:

.github/workflows/job_pytorch_models_tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919

2020
permissions: read-all
2121

22+
env:
23+
HF_HUB_CACHE_LIN: /mount/caches/huggingface
24+
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
25+
2226
jobs:
2327
PyTorch_Models_Tests:
2428
name: PyTorch Models tests
@@ -67,9 +71,8 @@ jobs:
6771
name: openvino_tokenizers_wheel
6872
path: ${{ env.INSTALL_DIR }}
6973

70-
- name: Setup HuggingFace Cache Directory (Windows)
71-
if: runner.os == 'Windows'
72-
run: Add-Content -Path $env:GITHUB_ENV -Value "HF_HUB_CACHE=C:\\mount\\caches\\huggingface"
74+
- name: Setup Variables
75+
run: echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
7376

7477
- name: Extract OpenVINO artifacts
7578
run: pigz -dc openvino_tests.tar.gz | tar -xf - -v

0 commit comments

Comments
 (0)