Skip to content

[DataFlow runtime 1/7] Make SGLang target imports optional#594

Merged
jiapingW merged 1 commit into
sgl-project:mainfrom
maocheng23:dataflow-up-1-sglang-guard
Jun 25, 2026
Merged

[DataFlow runtime 1/7] Make SGLang target imports optional#594
jiapingW merged 1 commit into
sgl-project:mainfrom
maocheng23:dataflow-up-1-sglang-guard

Conversation

@maocheng23

Copy link
Copy Markdown
Collaborator

DataFlow runtime — part 1/7 (base of the stack).

Wraps the sglang.srt.* imports in specforge/modeling/target/eagle3_target_model.py in try/except so import specforge (and the HF / offline / draft paths) works even when the installed sglang version does not expose the exact symbols this file pins. The sglang target backend still requires a matching sglang and now surfaces a clear error at construction (SGLangEagle3TargetModel.from_pretrained) instead of crashing at import.

Why: a sglang version skew currently breaks import specforge entirely, blocking users who do not use the sglang target backend at all. Risk: behavior-identical when sglang is present (imports run as before); only the no-sglang path changes. This is the single existing file the whole series modifies.

Part of a 7-PR series adding the DataFlow runtime (specforge/runtime/, milestones M1–M4). Verified on current upstream main: all subpackages import and 65 component tests pass. The integration launcher (launch.py + train_eagle3_dataflow.py) and the end-to-end equivalence gates are a deliberate follow-up, not in this series.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants