Skip to content

Commit 59eba49

Browse files
authored
download and use HF Hub Cache (#41181)
use hub cache Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
1 parent de3ee73 commit 59eba49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.circleci/create_circleci_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def to_dict(self):
186186
# During the CircleCI docker images build time, we might already (or not) download the data.
187187
# If it's done already, the files are inside the directory `/test_data/`.
188188
{"run": {"name": "fetch hub objects before pytest", "command": "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py"}},
189+
{"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/'}},
189190
{"run": {
190191
"name": "Run tests",
191192
"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)"}

0 commit comments

Comments
 (0)