Skip to content

Commit 10562a9

Browse files
committed
Fix Spark-X2.5 CI: use writable HF_HOME for model download
The CI runners mount /mnt/hf_cache as read-only. Existing models (qwen3, phi_4_mini, lfm2_5) are pre-cached there, but Spark-X2.5 models are not, causing hf download to fail with: OSError: [Errno 30] Read-only file system: /mnt/hf_cache/hub/models--XHToken--Spark-X2.5-* Set HF_HOME to a writable temp directory for Spark-X2.5 models only, following the same pattern used in cuda.yml.
1 parent 0fd9b04 commit 10562a9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎.ci/scripts/test_torchao_huggingface_checkpoints.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ case "$MODEL_NAME" in
127127

128128
spark_x2_5_1_7b)
129129
echo "Running Spark-X2.5-1.7B export..."
130+
export HF_HOME="${RUNNER_TEMP:-/tmp}/hf_cache"
131+
mkdir -p "${HF_HOME}"
130132
HF_MODEL_DIR=$(hf download XHToken/Spark-X2.5-1.7B)
131133
EXPECTED_MODEL_SIZE_UPPER_BOUND=$((2 * 1024 * 1024 * 1024)) # 2GB
132134
$PYTHON_EXECUTABLE -m executorch.examples.models.spark_x2_5.convert_weights \
@@ -151,6 +153,8 @@ case "$MODEL_NAME" in
151153

152154
spark_x2_5_4b)
153155
echo "Running Spark-X2.5-4B export..."
156+
export HF_HOME="${RUNNER_TEMP:-/tmp}/hf_cache"
157+
mkdir -p "${HF_HOME}"
154158
HF_MODEL_DIR=$(hf download XHToken/Spark-X2.5-4B)
155159
EXPECTED_MODEL_SIZE_UPPER_BOUND=$((5 * 1024 * 1024 * 1024)) # 5GB
156160
$PYTHON_EXECUTABLE -m executorch.examples.models.spark_x2_5.convert_weights \

0 commit comments

Comments
 (0)