Alina Lozovskaya
commited on
Commit
·
efcd215
1
Parent(s):
5c38d15
Fix tests.yml
Browse files- .github/workflows/tests.yml +13 -8
.github/workflows/tests.yml
CHANGED
|
@@ -35,13 +35,12 @@ jobs:
|
|
| 35 |
|
| 36 |
- uses: astral-sh/setup-uv@v5
|
| 37 |
|
| 38 |
-
# Set HF_HOME using the runner's temp dir for this job
|
| 39 |
- name: Set HF_HOME
|
|
|
|
| 40 |
run: |
|
| 41 |
echo "HF_HOME=${RUNNER_TEMP}/.hf" >> "$GITHUB_ENV"
|
| 42 |
mkdir -p "${RUNNER_TEMP}/.hf"
|
| 43 |
|
| 44 |
-
# Cache HF artifacts so subsequent runs don't re-download
|
| 45 |
- name: Cache Hugging Face hub
|
| 46 |
uses: actions/cache@v4
|
| 47 |
with:
|
|
@@ -52,14 +51,20 @@ jobs:
|
|
| 52 |
- name: Install (locked)
|
| 53 |
run: |
|
| 54 |
uv sync --frozen --group dev --extra all_vision
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
#
|
| 57 |
-
- name:
|
| 58 |
run: |
|
| 59 |
-
python - <<'PY'
|
| 60 |
-
import
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
PY
|
| 64 |
|
| 65 |
- name: Run tests
|
|
|
|
| 35 |
|
| 36 |
- uses: astral-sh/setup-uv@v5
|
| 37 |
|
|
|
|
| 38 |
- name: Set HF_HOME
|
| 39 |
+
shell: bash
|
| 40 |
run: |
|
| 41 |
echo "HF_HOME=${RUNNER_TEMP}/.hf" >> "$GITHUB_ENV"
|
| 42 |
mkdir -p "${RUNNER_TEMP}/.hf"
|
| 43 |
|
|
|
|
| 44 |
- name: Cache Hugging Face hub
|
| 45 |
uses: actions/cache@v4
|
| 46 |
with:
|
|
|
|
| 51 |
- name: Install (locked)
|
| 52 |
run: |
|
| 53 |
uv sync --frozen --group dev --extra all_vision
|
| 54 |
+
# If you enable HF_HUB_ENABLE_HF_TRANSFER above:
|
| 55 |
+
# uv pip install "huggingface_hub[hf_transfer]"
|
| 56 |
|
| 57 |
+
# Prefetch the dataset to avoid download during test collection
|
| 58 |
+
- name: Prefetch HF dataset
|
| 59 |
run: |
|
| 60 |
+
uv run python - <<'PY'
|
| 61 |
+
from huggingface_hub import snapshot_download
|
| 62 |
+
snapshot_download(
|
| 63 |
+
repo_id="pollen-robotics/reachy-mini-emotions-library",
|
| 64 |
+
repo_type="dataset",
|
| 65 |
+
etag_timeout=120,
|
| 66 |
+
max_workers=4
|
| 67 |
+
)
|
| 68 |
PY
|
| 69 |
|
| 70 |
- name: Run tests
|