Repository navigation
[Refactor] utils: Move domain-dependent modules out of srt.utils - #48758
Merged
Merged
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
hnyls2002
requested review from
BBuf,
Edwardf0t1,
Fridge003,
HaiShaw,
JustinTong0323,
Kangyan-Zhou,
Qiaolin-Yu,
ShangmingCai,
Ying1123,
adarshxs,
b8zhong,
ch-wan,
fzyzcjy,
hzh0425,
ispobock,
jybsuper,
kpham-sgl,
lifuhuang,
merrymercy,
mickqian,
ping1jing2,
pyc96,
sherlockwu,
sufeng-buaa,
xiezhq-hermann,
yctseng0211,
yhyang201,
yuan-luo and
yushengsu-thu
as code owners
November 6, 2026 00:25
… writer between crash and periodic dumps
hnyls2002
requested review from
Alisehen,
AniZpZ,
FlamingoPg and
OrangeRedeng
as code owners
November 6, 2026 01:38
metamergebot
added a commit
that referenced
this pull request
Nov 6, 2026
#48758 moved the crash-dump writer, the last other user of pickle in this module, out to sglang.srt.observability and dropped the import; the pickled request history still needs it here.
alexnails
pushed a commit
to zyt329/sglang
that referenced
this pull request
Nov 6, 2026
Multimodal models load tokenizers through get_processor(), which bypassed the _fix_v5_add_bos_eos_token() compatibility repair applied by get_tokenizer(). For affected Gemma tokenizers, the processor path could omit the expected BOS token. Apply the existing helper to the final tokenizer selected by get_processor() and add a CPU-only regression test. Rebased onto main after hf_transformers moved out of srt.utils (sgl-project#48758).
2 of 5 tasks
kpham-sgl
added a commit
to kpham-sgl/sglang
that referenced
this pull request
Nov 6, 2026
…ckend check Main moved sglang.srt.utils.hf_transformers to sglang.srt.hf_transformers (sgl-project#48758).
metamergebot
added a commit
that referenced
this pull request
Nov 6, 2026
…bility Upstream moved `sglang.srt.utils.request_logger` to `sglang.srt.observability.request_logger` (#48758) after the request-log port was written, so `rust_server/config.py` and `test_rust_request_log.py` failed to import. Import from the new module; no other change.
metamergebot
added a commit
that referenced
this pull request
Nov 6, 2026
Takes current `main` through the parent branch. Conflicts resolved: - `python/sglang/srt/utils/crash_dump.py` moved to `python/sglang/srt/observability/request_dump.py` (#48758) and its writer split into `build_request_dump` / `save_request_dump` / `write_crash_dump`: the crash-dump additions (grace constants, `crash_dump_hostname`, `filename_suffix`, the dumping marker, `wait_for_crash_dumps`, `CrashDumpGrace`) now live there, and the atomic write is `save_request_dump` to a uniquely named temporary file plus `os.replace`, so upstream keeps one pickle writer. - `run_scheduler_process` keeps `main`'s `traceback.format_exc()` line and dumps before SIGQUIT after it. - `rust_server/server.py` imports: `main`'s `envs` and `get_device` plus the crash-dump names from the new module. - Imports in `entrypoints/engine.py` and the moved unit test (`test/registered/unit/observability/test_crash_dump.py`) follow the module.
metamergebot
added a commit
that referenced
this pull request
Nov 6, 2026
Brings upstream main in under the port, through the parent branch. Two upstream refactors moved functions this change edits, so the same redaction now sits where they live; no other line changes: - `build_server_info` moved to `entrypoints/server_utils.py` (#48781): the server-info redaction and its import follow it, and the test imports it from there. - `utils/crash_dump.py` became `observability/request_dump.py`, with `write_crash_dump` split into `build_request_dump`, `save_request_dump` and `write_crash_dump` (#48758): `server_args` and `resolved_config` are redacted in `build_request_dump`, which every writer calls, and the launch command in `write_crash_dump`. - `tokenizer_manager.py` no longer uses `redact_watermark_secrets` after that move, so the now-unused import goes.
3 of 5 tasks
metamergebot
added a commit
that referenced
this pull request
Nov 6, 2026
…bility in the parity scan Upstream #48758 moved python/sglang/srt/utils/request_logger.py to python/sglang/srt/observability/request_logger.py. The parity scan lists every Python-frontend source it reads, and reads each with read_text(), so the old entry would raise FileNotFoundError on first use. One path line changes; nothing else.
5 tasks done
3 of 5 tasks
This was referenced Nov 11, 2026
Closed
4 of 5 tasks
5 tasks done
nvpohanh
added a commit
to rystewart-nvidia/sglang
that referenced
this pull request
Nov 17, 2026
Move dflash_gguf.py to python/sglang/srt/hf_transformers/ after sgl-project#48758 and update its imports. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
profile_utilsandrequest_loggertosglang.srt.observabilityoffloaderandhost_shared_memorytosglang.srt.layers;model_loaderwould form an import cycle, since its package init reacheslayersmodules that import the offloader at module levelweight_checkerandweight_checker_comparatortosglang.srt.model_executorcuda_vmm_transport_utilstosglang.srt.multimodal.transport.cuda_vmm, next tocuda_ipccrash_dumptosglang.srt.observability.request_dump, next to its--crash-dump-folderflag's group. The periodicdump_requests_folderdump writes the same file format through its own copy of the code inTokenizerManager; both now usebuild_request_dumpandsave_request_dumpfrom that modulehf_transformers/tosglang.srt.hf_transformers; it now importshf_transformers_patchesfromsglang.srt.utilsby absolute pathmock.patchtarget, CODEOWNERS entry, and path in comments; the weight checker, request logger, and crash dump tests move next to their modulescheck-srt-utils-importsdrops its allowlist, since everysglang.srt.utilsmodule now follows the rule, and fails when it finds no files to scanNo behavior change: module contents are unchanged apart from import paths, and both dump writers produce byte-identical files (checked with picklable and unpicklable
server_args). The only visible difference is that the periodic dump's pickle-retry error is logged bysglang.srt.observability.request_dumpinstead of theTokenizerManagerlogger.CI States
Latest PR Test (Base): 🚫 Run #42145343297
Latest PR Test (Extra): ❌ Run #42145343406
Latest PR Test (AMD ROCm 10): 🚫 Run #42145343423
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: