Skip to content

CircleCI: disable hugginface xet - #3316

Merged
MMathisLab merged 1 commit into
mainfrom
jaap/fix_circle_ci_hugginface_xet
May 11, 2026
Merged

CircleCI: disable hugginface xet#3316
MMathisLab merged 1 commit into
mainfrom
jaap/fix_circle_ci_hugginface_xet

Conversation

@deruyter92

@deruyter92 deruyter92 commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Currently CircleCI fails because of hanging connections with HuggingFace using xet.

Loading pretrained weights from Hugging Face hub (timm/resnet50_gn.a1h_in1k)
HTTP Request: GET https://huggingface.co/api/models/timm/resnet50_gn.a1h_in1k/xet-read-token/b5b1dcfc1a526af275ec440b8d697c66c90a98b1 "HTTP/1.1 200 OK"
model.safetensors:   0% 70.5k/102M [00:01<24:59, 68.1kB/s]
Too long with no output (exceeded 10m0s): context deadline exceeded

Xet is Hugging Face’s new storage backend designed to replace the aging Git LFS (Large File Storage). While Git LFS treats every file as a single "blob," Xet breaks files into small "chunks."

In restricted CI environments (like CircleCI, GCP, or Kaggle), the Xet "chunked" download often stalls. Because Xet opens many simultaneous connections to different data chunks, CI firewalls or NAT gateways sometimes flag this as suspicious activity or simply drop the connections when they hit a certain threshold.

Changes

This PR disables Xet:

environment:
    HF_HUB_DISABLE_XET: 1

and sets caching for the huggingface weights, to avoid repeated downloading. This also improves stability in case of a bad network connection.

- restore_cache:
    name: Restore Hugging Face cache
    keys:
      - hf-weights-v1-{{ checksum "pyproject.toml" }}
      - hf-weights-v1-

More information

Xet is Hugging Face’s new storage backend designed to replace the aging Git LFS (Large File Storage). While Git LFS treats every file as a single "blob," Xet breaks files into small "chunks."

In restricted CI environments (like CircleCI, GCP, or Kaggle), the Xet "chunked" download often stalls. Because Xet opens many simultaneous connections to different data chunks, CI firewalls or NAT gateways sometimes flag this as suspicious activity or simply drop the connections when they hit a certain threshold.
@deruyter92
deruyter92 marked this pull request as ready for review May 7, 2026 09:16
@deruyter92
deruyter92 requested a review from C-Achard May 7, 2026 09:16
@deruyter92
deruyter92 requested review from AlexEMG and MMathisLab May 7, 2026 09:44
@deruyter92

Copy link
Copy Markdown
Collaborator Author

Note: CI is still failing for MacOS, which will be fixed if we simultaneously merge #3292

@C-Achard C-Achard assigned AlexEMG and MMathisLab and unassigned AlexEMG and MMathisLab May 11, 2026
@C-Achard C-Achard added the CI Related to CI/CD jobs and automated testing label May 11, 2026

@MMathisLab MMathisLab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@MMathisLab
MMathisLab merged commit c090f80 into main May 11, 2026
15 of 18 checks passed
@MMathisLab
MMathisLab deleted the jaap/fix_circle_ci_hugginface_xet branch May 11, 2026 20:28

@AlexEMG AlexEMG left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@deruyter92 deruyter92 mentioned this pull request May 21, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Related to CI/CD jobs and automated testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants