Skip to content

[Fix] CI: Preserve shared HF cache during incomplete retries - #45005

Closed
seongyun1104 wants to merge 2 commits into
sgl-project:mainfrom
seongyun1104:fix/muse-hf-cache-incomplete-race
Closed

seongyun1104 wants to merge 2 commits into
sgl-project:mainfrom
seongyun1104:fix/muse-hf-cache-incomplete-race

Conversation

@seongyun1104

@seongyun1104 seongyun1104 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Follow up on the shared Hugging Face cache race noted in #44975 while re-enabling the Muse Spark B300 PD test from #44666.

In the original failing job, one TP rank found a single blobs/*.incomplete file and removed the entire model cache at 07:32:01.334 UTC. The removal completed at 07:32:01.361, and a concurrent tokenizer load failed at 07:32:01.614. The full removal includes the snapshot metadata, tokenizer, and config used by other readers.

The later #44975 B300 run passed all three Muse tests without this patch, so it shows that the startup failure is intermittent rather than demonstrating this fix.

Failure job: https://github.com/sgl-project/sglang/actions/runs/39099912264/job/117611788593

Modifications

  • Do not remove the shared model-cache root merely because an .incomplete blob exists.
  • Return False from local snapshot validation so the existing CI download path handles recovery.
  • Keep the existing shared-lock sequence: acquire the cache lock, re-check the cache, remove only incomplete blobs, then download and validate.
  • Add a CPU regression using a temporary HF cache. It verifies that:
    • initial validation preserves snapshot/tokenizer/config files;
    • cleanup runs while the shared lock is held;
    • only the incomplete blob is removed;
    • the mocked download and validation retry completes.

Validation

  • Direct real-module CPU regression: 1/1 passed.
  • pre-commit run --files python/sglang/srt/model_loader/ci_weight_validation.py test/registered/unit/model_loader/test_ci_weight_validation.py: passed.
  • Ruff, compileall, and git diff --check: passed.
  • Normal local pytest collection was unavailable because this environment lacks pybase64; no package was installed.
  • No GPU or model download was used for this change.

CI States

Latest PR Test (Base): ❌ Run #39135118827
Latest PR Test (Extra): ❌ Run #39135118665
Latest PR Test (AMD ROCm 10): ❌ Run #39135118609

@github-actions

Copy link
Copy Markdown
Contributor

Thanks @seongyun1104. Closing this because you have 6 PRs open and none updated in 7 days, over our soft cap of 5 for idle PRs.

Reopen the two or three you most want reviewed - a short active set moves faster than a long idle one.

Some directories moved recently, so an older branch may need retargeting:
sgl-kernel/ -> python/sglang/kernels/aot/, python/sglang/jit_kernel/
-> python/sglang/kernels/jit/, docs/ -> docs/docs/ (.mdx),
bench_serving.py -> benchmark/serving.py, test/srt/ -> test/registered/.

@github-actions github-actions Bot closed this Nov 27, 2026
@seongyun1104
seongyun1104 deleted the fix/muse-hf-cache-incomplete-race branch November 27, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant