Skip to content

Commit 1643611

Browse files
authored
Disable HF Xet storage across all CI scripts (#19371)
HuggingFace's Xet storage backend stalls mid-download on CI runners, causing 90-minute job timeouts. Set HF_HUB_DISABLE_XET=1 in every CI script and workflow that downloads from HuggingFace to force standard HTTP downloads instead.
1 parent 74c7c91 commit 1643611

7 files changed

Lines changed: 20 additions & 0 deletions

File tree

.ci/scripts/download_hf_hub.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# Disable HF Xet storage to avoid stalled downloads on CI runners
4+
export HF_HUB_DISABLE_XET=1
5+
36
# Function to download files from the Hugging Face Hub
47
# Arguments:
58
# 1. model_id: The Hugging Face repository ID (e.g., "organization/model_name")

.ci/scripts/export_model_artifact.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ if [ -z "${1:-}" ]; then
6767
exit 1
6868
fi
6969

70+
# Disable HF Xet storage to avoid stalled downloads on CI runners
7071
export HF_HUB_DISABLE_XET=1
7172

7273
set -eux

.ci/scripts/test_huggingface_optimum_model.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
import gc
33
import logging
44
import math
5+
import os
56
import shutil
67
import subprocess
78
import tempfile
89
import time
910
from pathlib import Path
1011
from typing import List
1112

13+
# Disable HF Xet storage to avoid stalled downloads on CI runners
14+
os.environ.setdefault("HF_HUB_DISABLE_XET", "1")
15+
1216
import torch
1317
from datasets import load_dataset
1418

.ci/scripts/test_lora.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# LICENSE file in the root directory of this source tree.
77

88
set -exu
9+
# Disable HF Xet storage to avoid stalled downloads on CI runners
10+
export HF_HUB_DISABLE_XET=1
911
# shellcheck source=/dev/null
1012
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1113

.ci/scripts/test_lora_multimethod.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# LICENSE file in the root directory of this source tree.
77

88
set -exu
9+
# Disable HF Xet storage to avoid stalled downloads on CI runners
10+
export HF_HUB_DISABLE_XET=1
911
# shellcheck source=/dev/null
1012
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1113

.ci/scripts/test_phi_3_mini.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# LICENSE file in the root directory of this source tree.
77

88
set -exu
9+
# Disable HF Xet storage to avoid stalled downloads on CI runners
10+
export HF_HUB_DISABLE_XET=1
911

1012
BUILD_TYPE=${1:-Debug}
1113
BUILD_DIR=${3:-cmake-out}

.github/workflows/mlx.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ jobs:
306306
timeout: 90
307307
script: |
308308
set -eux
309+
# Disable HF Xet storage to avoid stalled downloads on CI runners
310+
export HF_HUB_DISABLE_XET=1
309311
310312
echo "::group::Install ExecuTorch"
311313
${CONDA_RUN} python install_executorch.py > /dev/null
@@ -382,6 +384,8 @@ jobs:
382384
timeout: 90
383385
script: |
384386
set -eux
387+
# Disable HF Xet storage to avoid stalled downloads on CI runners
388+
export HF_HUB_DISABLE_XET=1
385389
386390
echo "::group::Install ExecuTorch and configure MLX build"
387391
${CONDA_RUN} python install_executorch.py > /dev/null
@@ -510,6 +514,8 @@ jobs:
510514
timeout: 90
511515
script: |
512516
set -eux
517+
# Disable HF Xet storage to avoid stalled downloads on CI runners
518+
export HF_HUB_DISABLE_XET=1
513519
514520
MODEL_ID="${{ matrix.model.id }}"
515521
MODEL_NAME="${{ matrix.model.name }}"

0 commit comments

Comments
 (0)