Skip to content

[CI] vlm: Pin baidu/Unlimited-OCR revision in test_unlimited_ocr_server - #44235

Merged
nvpohanh merged 2 commits into
sgl-project:mainfrom
nvpohanh:claude/ci-fix-unlimited-ocr-revision
Oct 14, 2026
Merged

nvpohanh merged 2 commits into
sgl-project:mainfrom
nvpohanh:claude/ci-fix-unlimited-ocr-revision

Conversation

@nvpohanh

@nvpohanh nvpohanh commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

[by Claude Code]

Motivation

Fixes #44234.

At 2026-10-14 06:17:59 UTC, the Hugging Face repo baidu/Unlimited-OCR was updated (8249d20b). The update renamed the config's model_type from unlimited-ocr to unlimited_ocr. sglang registers UnlimitedVLConfig only under unlimited-ocr, so transformers now treats the config as remote code. test/registered/vlm/test_unlimited_ocr_server.py launches without --trust-remote-code, so its server fails during argument resolution:

ValueError: The repository baidu/Unlimited-OCR contains custom code which must be executed to correctly load the model.

Example failure: https://github.com/sgl-project/sglang/actions/runs/38514395774/job/115695664058

Modifications

  • Pin the test to the last HF revision before the update: --revision=07dea832e22aefee32ad281d4b80551282e1c168.
    • sglang passes --revision through to its config, tokenizer, processor and weight loaders.
    • The weight blob is identical across both revisions, so the CI HF cache is reused.
    • If the offline-cache check enables HF_HUB_OFFLINE=1 and the pinned snapshot is missing, popen_launch_server already retries online.

The same HF commit also added chat_template.jinja, generation_config.json and preprocessor_config.json, and it changed processor_config.json. Supporting the new upstream layout (registering unlimited_ocr and checking output parity) is a follow-up for the model owners. After that, the pin can be removed.

Accuracy Tests

N/A (test-only change). CPU validation on latest main with transformers 5.17.0:

  • get_config("baidu/Unlimited-OCR", trust_remote_code=False, revision="main") raises the ValueError above.
  • With revision="07dea832...", it returns UnlimitedVLConfig (['UnlimitedOCRForCausalLM']), and get_processor returns UnlimitedOCRHFProcessor.

I couldn't run the full GPU test locally (it needs an H100 with fa3), so CI will confirm.

Speed Tests and Profiling

N/A

Checklist

🤖 Generated with Claude Code


CI States

Latest PR Test (Base): ❌ Run #38530999283
Latest PR Test (Extra): ❌ Run #38530999189
Latest PR Test (AMD ROCm 10): ❌ Run #38530999618

The 2026-10-14 HF update (8249d20b) renamed the config model_type from
"unlimited-ocr" to "unlimited_ocr". sglang registers UnlimitedVLConfig only
under "unlimited-ocr", so transformers falls back to the repo's custom code
and the test (trust_remote_code=False) fails to launch the server. Pin the
last revision before the update.

Fixes sgl-project#44234

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nvpohanh

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/vlm/test_unlimited_ocr_server.py

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🚀 1-gpu-h100 (1 test): ✅ View workflow run

cd test/ && python3 registered/vlm/test_unlimited_ocr_server.py

@nvpohanh

Copy link
Copy Markdown
Collaborator Author

Merge to unblock pipeline. @mickqian please follow up on this and implement proper support in SGLang for this model using the latest HF checkpoint version. Thanks

@nvpohanh
nvpohanh merged commit 3b72b70 into sgl-project:main Oct 14, 2026
110 of 122 checks passed
mickqian pushed a commit that referenced this pull request Oct 14, 2026
nvpohanh added a commit to elvischenv/sglang that referenced this pull request Oct 14, 2026
Picks up sgl-project#44235, which fixes the unrelated CI failure https://github.com/sgl-project/sglang/actions/runs/38526042082/job/116122631121 (test_unlimited_ocr_server.py, baidu/Unlimited-OCR HF config rename).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

[CI] test_unlimited_ocr_server fails on main: HF model_type rename requires trust_remote_code

1 participant