From 59eba49237c78a145c65cf4de9370965d5510d74 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Fri, 3 Oct 2025 11:11:37 +0200 Subject: [PATCH] download and use HF Hub Cache (#41181) use hub cache Co-authored-by: ydshieh --- .circleci/create_circleci_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/create_circleci_config.py b/.circleci/create_circleci_config.py index 1705b2fe558..6e98ee0f149 100644 --- a/.circleci/create_circleci_config.py +++ b/.circleci/create_circleci_config.py @@ -186,6 +186,7 @@ class CircleCIJob: # During the CircleCI docker images build time, we might already (or not) download the data. # If it's done already, the files are inside the directory `/test_data/`. {"run": {"name": "fetch hub objects before pytest", "command": "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py"}}, + {"run": {"name": "download and unzip hub cache", "command": 'curl -L -o huggingface-cache.tar.gz https://huggingface.co/datasets/hf-internal-testing/hf_hub_cache/resolve/main/huggingface-cache.tar.gz && apt-get install pigz && tar --use-compress-program="pigz -d -p 8" -xf huggingface-cache.tar.gz && mv -n hub/* /root/.cache/huggingface/hub/ && ls -la /root/.cache/huggingface/hub/'}}, {"run": { "name": "Run tests", "command": f"({timeout_cmd} python3 -m pytest {marker_cmd} -n {self.pytest_num_workers} {junit_flags} {repeat_on_failure_flags} {' '.join(pytest_flags)} $(cat splitted_tests.txt) | tee tests_output.txt)"}