Skip to content

Commit 3e79199

Browse files
committed
Trim Hugging Face token for CUDA auth
1 parent f80ac78 commit 3e79199

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/cuda-perf.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ jobs:
125125
126126
echo "::group::Setup Huggingface"
127127
pip install -U "huggingface_hub[cli]>=1.2.1,<2.0" accelerate "optimum~=2.0.0" "transformers==5.0.0rc1"
128-
hf auth login --token "$SECRET_EXECUTORCH_HF_TOKEN"
128+
HF_AUTH_TOKEN="$(printf '%s' "$SECRET_EXECUTORCH_HF_TOKEN" | tr -d '\r\n')"
129+
hf auth login --token "$HF_AUTH_TOKEN"
129130
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
130131
pip install --no-deps git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
131132
echo "::endgroup::"

.github/workflows/cuda-windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ jobs:
9999
if [ "${{ matrix.model_name }}" != "dinov2-small-imagenet1k-1-layer" ]; then
100100
echo "::group::Setup Huggingface"
101101
pip install -U "huggingface_hub[cli]>=1.2.1,<2.0" accelerate "optimum~=2.0.0" "transformers==5.0.0rc1"
102-
hf auth login --token "$SECRET_EXECUTORCH_HF_TOKEN"
102+
HF_AUTH_TOKEN="$(printf '%s' "$SECRET_EXECUTORCH_HF_TOKEN" | tr -d '\r\n')"
103+
hf auth login --token "$HF_AUTH_TOKEN"
103104
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
104105
pip install --no-deps git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
105106
echo "::endgroup::"

.github/workflows/cuda.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ jobs:
289289
if [ "${{ matrix.model.name }}" != "parakeet-tdt" ] && [ "${{ matrix.model.name }}" != "dinov2-small-imagenet1k-1-layer" ]; then
290290
echo "::group::Setup Huggingface"
291291
pip install -U "huggingface_hub[cli]>=1.2.1,<2.0" accelerate "optimum~=2.0.0" "transformers==5.0.0rc1"
292-
hf auth login --token "$SECRET_EXECUTORCH_HF_TOKEN"
292+
HF_AUTH_TOKEN="$(printf '%s' "$SECRET_EXECUTORCH_HF_TOKEN" | tr -d '\r\n')"
293+
hf auth login --token "$HF_AUTH_TOKEN"
293294
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
294295
pip install --no-deps git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
295296
echo "::endgroup::"
@@ -470,7 +471,8 @@ jobs:
470471
471472
echo "::group::Setup Huggingface"
472473
pip install -U "huggingface_hub[cli]>=1.2.1,<2.0"
473-
hf auth login --token "$SECRET_EXECUTORCH_HF_TOKEN"
474+
HF_AUTH_TOKEN="$(printf '%s' "$SECRET_EXECUTORCH_HF_TOKEN" | tr -d '\r\n')"
475+
hf auth login --token "$HF_AUTH_TOKEN"
474476
echo "::endgroup::"
475477
476478
echo "::group::Install optimum-executorch"

0 commit comments

Comments
 (0)