Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

CVS-175243 use secondary hf token openvino (#35701)

Jakub Koniuszewskiedc9f5df250d
diff --git a/.github/workflows/job_jax_layer_tests.yml b/.github/workflows/job_jax_layer_tests.yml
index a50780acb90..3c95539e808 100644
--- a/.github/workflows/job_jax_layer_tests.yml
+++ b/.github/workflows/job_jax_layer_tests.yml
@@ -28,6 +28,8 @@ env:
PIP_CACHE_PATH_WIN: "C:\\mount\\caches\\pip\\win"
HF_HUB_CACHE_LIN: /mount/caches/huggingface
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
JAX_Layer_Tests:
@@ -38,8 +40,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN"
defaults:
run:
shell: ${{ contains(inputs.runner, 'win') && 'pwsh' || 'bash' }}
@@ -77,6 +79,7 @@ jobs:
run: |
echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
echo "HUGGINGFACE_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
diff --git a/.github/workflows/job_jax_models_tests.yml b/.github/workflows/job_jax_models_tests.yml
index 48503eee446..39528313fe0 100644
--- a/.github/workflows/job_jax_models_tests.yml
+++ b/.github/workflows/job_jax_models_tests.yml
@@ -22,6 +22,8 @@ permissions: read-all
env:
HF_HUB_CACHE_LIN: /mount/caches/huggingface
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
JAX_Models_Tests:
@@ -32,8 +34,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN"
defaults:
run:
shell: bash
@@ -79,6 +81,7 @@ jobs:
run: |
echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
echo "HUGGINGFACE_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
- name: Extract OpenVINO packages and tests
run: pigz -dc openvino_tests.tar.gz | tar -xf - -v
diff --git a/.github/workflows/job_onnx_models_tests.yml b/.github/workflows/job_onnx_models_tests.yml
index 06804535d57..61bb8911c36 100644
--- a/.github/workflows/job_onnx_models_tests.yml
+++ b/.github/workflows/job_onnx_models_tests.yml
@@ -18,6 +18,8 @@ permissions: read-all
env:
HF_HUB_CACHE_LIN: /mount/caches/huggingface
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
ONNX_Models_tests:
@@ -28,8 +30,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN" # Needed for HuggingFace cache authentication
defaults:
run:
shell: bash
@@ -80,6 +82,7 @@ jobs:
run: |
echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
echo "HUGGINGFACE_HUB_CACHE=$HF_HUB_CACHE" >> "$GITHUB_ENV"
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
echo "MODELS_SHARE_PATH=/mount/testdata$((GITHUB_RUN_NUMBER % NUMBER_OF_REPLICAS))" >> "$GITHUB_ENV"
# Issue 148922
diff --git a/.github/workflows/job_onnx_runtime.yml b/.github/workflows/job_onnx_runtime.yml
index c549e920638..bff4996fb9c 100644
--- a/.github/workflows/job_onnx_runtime.yml
+++ b/.github/workflows/job_onnx_runtime.yml
@@ -19,6 +19,10 @@ on:
permissions: read-all
+env:
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
+
jobs:
ONNX_Runtime:
name: ONNX Runtime Integration
@@ -30,7 +34,7 @@ jobs:
- /mount:/mount
- /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e SCCACHE_AZURE_BLOB_CONTAINER -e HF_TOKEN"
+ options: "-e SCCACHE_AZURE_BLOB_CONTAINER"
defaults:
run:
shell: bash
@@ -56,6 +60,10 @@ jobs:
echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENV
echo "✓ Connection string loaded and masked"
+ - name: Setup Variables
+ run: |
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
+
- name: Fetch ONNX runtime version and skip tests list
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
diff --git a/.github/workflows/job_pytorch_fx_layer_tests.yml b/.github/workflows/job_pytorch_fx_layer_tests.yml
index add984dcc35..ad1e73f15e0 100644
--- a/.github/workflows/job_pytorch_fx_layer_tests.yml
+++ b/.github/workflows/job_pytorch_fx_layer_tests.yml
@@ -26,6 +26,8 @@ permissions: read-all
env:
PIP_CACHE_PATH_LINUX: /mount/caches/pip/linux
PIP_CACHE_PATH_WIN: "C:\\mount\\caches\\pip\\win"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
PyTorch_FX_Layer_Tests:
@@ -36,8 +38,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN" # Needed for HuggingFace cache authentication
defaults:
run:
shell: ${{ contains(inputs.runner, 'win') && 'pwsh' || 'bash' }}
@@ -77,6 +79,10 @@ jobs:
Add-Content -Path $env:GITHUB_ENV -Value "HF_HUB_CACHE=C:\\mount\\caches\\huggingface"
Add-Content -Path $env:GITHUB_ENV -Value "HUGGINGFACE_HUB_CACHE=C:\\mount\\caches\\huggingface"
+ - name: Setup Variables
+ run: |
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
+
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
run: brew install pigz
diff --git a/.github/workflows/job_pytorch_layer_tests.yml b/.github/workflows/job_pytorch_layer_tests.yml
index 7d39ca959db..65fc4efcae3 100644
--- a/.github/workflows/job_pytorch_layer_tests.yml
+++ b/.github/workflows/job_pytorch_layer_tests.yml
@@ -28,6 +28,8 @@ env:
PIP_CACHE_PATH_WIN: "C:\\mount\\caches\\pip\\win"
HF_HUB_CACHE_LIN: /mount/caches/huggingface
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
PyTorch_Layer_Tests:
@@ -38,8 +40,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN" # Needed for HuggingFace cache authentication
defaults:
run:
shell: ${{ contains(inputs.runner, 'win') && 'pwsh' || 'bash' }}
@@ -77,6 +79,7 @@ jobs:
run: |
echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
echo "HUGGINGFACE_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
diff --git a/.github/workflows/job_pytorch_models_tests.yml b/.github/workflows/job_pytorch_models_tests.yml
index faf1eb73eed..c5e06718d80 100644
--- a/.github/workflows/job_pytorch_models_tests.yml
+++ b/.github/workflows/job_pytorch_models_tests.yml
@@ -22,6 +22,8 @@ permissions: read-all
env:
HF_HUB_CACHE_LIN: /mount/caches/huggingface
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
PyTorch_Models_Tests:
@@ -32,8 +34,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN" # Needed for HuggingFace cache authentication
defaults:
run:
shell: bash
@@ -77,6 +79,7 @@ jobs:
run: |
echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
echo "HUGGINGFACE_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
- name: Extract OpenVINO artifacts
run: pigz -dc openvino_tests.tar.gz | tar -xf - -v
diff --git a/.github/workflows/job_tensorflow_layer_tests.yml b/.github/workflows/job_tensorflow_layer_tests.yml
index 69abbdebc91..c374d3dfb69 100644
--- a/.github/workflows/job_tensorflow_layer_tests.yml
+++ b/.github/workflows/job_tensorflow_layer_tests.yml
@@ -28,6 +28,8 @@ env:
PIP_CACHE_PATH_WIN: "C:\\mount\\caches\\pip\\win"
HF_HUB_CACHE_LIN: /mount/caches/huggingface
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
TensorFlow_Layer_Tests:
@@ -38,8 +40,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN" # Needed for HuggingFace cache authentication
defaults:
run:
shell: ${{ contains(inputs.runner, 'win') && 'pwsh' || 'bash' }}
@@ -82,6 +84,7 @@ jobs:
run: |
echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
echo "HUGGINGFACE_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
- name: Install OpenVINO dependencies (mac)
if: ${{ runner.os == 'macOS' }}
diff --git a/.github/workflows/job_tensorflow_models_tests.yml b/.github/workflows/job_tensorflow_models_tests.yml
index 179fe2869ab..26551e10516 100644
--- a/.github/workflows/job_tensorflow_models_tests.yml
+++ b/.github/workflows/job_tensorflow_models_tests.yml
@@ -22,6 +22,8 @@ permissions: read-all
env:
HF_HUB_CACHE_LIN: /mount/caches/huggingface
HF_HUB_CACHE_WIN: "C:\\mount\\caches\\huggingface"
+ HF_TOKEN_PATH_LIN: /secrets/huggingface/token-secondary
+ HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
jobs:
TensorFlow_Models_Tests:
@@ -32,8 +34,8 @@ jobs:
image: ${{ inputs.image }}
volumes:
- /mount:/mount
+ - /home/runner/secrets/:/secrets:ro
- ${{ github.workspace }}:${{ github.workspace }} # Needed as ${{ github.workspace }} is not working correctly when using Docker
- options: "-e HF_TOKEN" # Needed for HuggingFace cache authentication
defaults:
run:
shell: bash
@@ -77,6 +79,7 @@ jobs:
run: |
echo "HF_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
echo "HUGGINGFACE_HUB_CACHE=${{ runner.os == 'Linux' && env.HF_HUB_CACHE_LIN || env.HF_HUB_CACHE_WIN }}" >> "$GITHUB_ENV"
+ echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
echo "TFHUB_CACHE_DIR=/mount/testdata$((GITHUB_RUN_NUMBER % NUMBER_OF_REPLICAS))/tfhub_models" >> "$GITHUB_ENV"
- name: Extract OpenVINO artifacts (Linux and macOS)