Fix dataclasses.asdict on the msgspec ServerArgs (#38958)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alison Shao
2026-09-10 17:22:54 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 52c191da52
commit 00143e9c23
4 changed files with 10 additions and 7 deletions
@@ -9,9 +9,10 @@ which is useful to implement an online-like generation with batched inference.
import argparse
import asyncio
import dataclasses
import time
import msgspec
import sglang as sgl
from sglang.srt.server_args import ServerArgs
@@ -26,7 +27,7 @@ class InferenceEngine:
async def run_server(server_args):
inference = InferenceEngine(**dataclasses.asdict(server_args))
inference = InferenceEngine(**msgspec.structs.asdict(server_args))
# Sample prompts.
prompts = [