servediff 0.3.4__tar.gz → 0.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {servediff-0.3.4 → servediff-0.3.6}/CHANGELOG.md +15 -0
- {servediff-0.3.4 → servediff-0.3.6}/PKG-INFO +30 -4
- {servediff-0.3.4 → servediff-0.3.6}/README.md +29 -3
- {servediff-0.3.4 → servediff-0.3.6}/pyproject.toml +1 -1
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff/cli.py +84 -4
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff.egg-info/PKG-INFO +30 -4
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff.egg-info/SOURCES.txt +1 -0
- servediff-0.3.6/tests/fixtures/sglang-0.4.4-tp4.log +23 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/test_cli.py +29 -0
- {servediff-0.3.4 → servediff-0.3.6}/CONTRIBUTING.md +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/LICENSE +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/MANIFEST.in +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/README.zh-CN.md +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/examples/issue-excerpts/vllm-47047-v0.23-default.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/examples/issue-excerpts/vllm-47047-v0.23-marlin.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/examples/issue-excerpts/vllm-53472-v0.23.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/examples/issue-excerpts/vllm-53472-v0.26-flag.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/examples/issue-excerpts/vllm-53472-v0.26.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/setup.cfg +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff/__init__.py +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff/__main__.py +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff/env.py +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff.egg-info/dependency_links.txt +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff.egg-info/entry_points.txt +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff.egg-info/requires.txt +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/src/servediff.egg-info/top_level.txt +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/fixtures/README.md +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/fixtures/vllm-47047-v0.23-default.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/fixtures/vllm-47047-v0.23-marlin.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/fixtures/vllm-53472-v0.23.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/fixtures/vllm-53472-v0.26-flag.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/fixtures/vllm-53472-v0.26.log +0 -0
- {servediff-0.3.4 → servediff-0.3.6}/tests/test_env.py +0 -0
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.6 — 2026-11-03
|
|
4
|
+
|
|
5
|
+
- Parse SGLang's `server_args=ServerArgs(...)` keyword-call form (not just the
|
|
6
|
+
`{...}` dict literal): verified against a real SGLang startup log (sgl-project/sglang#4862,
|
|
7
|
+
v0.4.4, TP=4) — model, TP size, memory fraction, port, attention/sampling backends
|
|
8
|
+
and startup failure with root cause are now extracted instead of nothing.
|
|
9
|
+
- Record `startup=failed` for AttributeError/KeyError/TypeError as well as
|
|
10
|
+
RuntimeError/ValueError/OOM/AssertionError; expose the SGLang `port` arg.
|
|
11
|
+
- Add `servediff --version` (prints the installed package version).
|
|
12
|
+
|
|
13
|
+
## 0.3.5 — 2026-11-02
|
|
14
|
+
|
|
15
|
+
- README: document the real TP>1 validation (vLLM 0.23.1 TP=8, issue #48591) and
|
|
16
|
+
the #63705 decode-only regression analysis as usage examples.
|
|
17
|
+
|
|
3
18
|
## 0.3.4 — 2026-11-02
|
|
4
19
|
|
|
5
20
|
- Verified the parallel-config rules against a real TP=8 startup log (vLLM 0.23.1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: servediff
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Diff what your vLLM / SGLang server actually ran with: auto-selected backends, CUDA graphs, startup failures, dependency versions.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/apex-mochen/servediff
|
|
@@ -104,6 +104,29 @@ uva_buffers <absent> fallba
|
|
|
104
104
|
5 difference(s); 11 fact(s) identical. Absent means the log did not print it, not that it was off.
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
## Validated against real TP>1 logs
|
|
108
|
+
|
|
109
|
+
The parallel-config rules were written and checked against a real TP=8 startup log
|
|
110
|
+
posted in [vllm#48591](https://github.com/vllm-project/vllm/issues/48591) (v0.23.1,
|
|
111
|
+
8 workers, one `world_size=N` line per rank, role assignment without an ETP field):
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
parallel.world_size 8
|
|
115
|
+
parallel.roles DP rank 0, PP rank 0, PCP rank 0, TP rank 0, EP rank N/A, EPLB rank N/A
|
|
116
|
+
compile.fusions allreduce_rms
|
|
117
|
+
startup failed
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
So a TP4+EP comparison (like the one in the
|
|
121
|
+
[#63705 analysis](https://github.com/apex-mochen/servediff/blob/main/ISSUE-63705-analysis.md)
|
|
122
|
+
— a decode-only regression across vLLM 0.29–0.32) can be scripted as:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
servediff capture -o v026.log -- docker run ... vllm/vllm-openai:v0.26.0 ...
|
|
126
|
+
servediff capture -o v029.log -- docker run ... vllm/vllm-openai:v0.29.0 ...
|
|
127
|
+
servediff diff v026.log v029.log --markdown
|
|
128
|
+
```
|
|
129
|
+
|
|
107
130
|
## Dependency versions: `servediff env`
|
|
108
131
|
|
|
109
132
|
Logs do not print torch / triton / flashinfer versions, and upgrades of those change
|
|
@@ -153,7 +176,7 @@ contains `TOKEN`, `KEY`, `SECRET`, `PASSWORD`, `CREDENTIAL` or `AUTH` are replac
|
|
|
153
176
|
| KV cache layout | `Using LBNHC KV cache layout` (0.30+) | — |
|
|
154
177
|
| model loading | `Model loading took … GiB memory and … seconds` | — |
|
|
155
178
|
| torch.compile | `collected artifacts: …`, `torch.compile took … s in total` | — |
|
|
156
|
-
| startup outcome | ready / failed + root-cause error | ready |
|
|
179
|
+
| startup outcome | ready / failed + root-cause error | ready / failed + root-cause error |
|
|
157
180
|
|
|
158
181
|
Every fact keeps the log line it came from (`servediff show <log>` or `--json`).
|
|
159
182
|
A fact the log did not print is `<absent>`: servediff never fills in defaults.
|
|
@@ -191,8 +214,11 @@ Exit codes: `0` no differences, `1` differences, `2` nothing recognised.
|
|
|
191
214
|
- Tested on: log excerpts posted in vllm#47047 (v0.23) and vllm#53472 (v0.23, v0.26);
|
|
192
215
|
full startup logs of vLLM 0.28.0 and 0.30.0 and one SGLang log (single-GPU dense);
|
|
193
216
|
a real TP=8 startup log from vllm#48591 (v0.23.1, one line per worker + role
|
|
194
|
-
assignment)
|
|
195
|
-
|
|
217
|
+
assignment); a real SGLang startup log from sgl-project/sglang#4862 (v0.4.4, TP=4,
|
|
218
|
+
Qwen2.5-Omni-7B — `server_args=ServerArgs(...)` keyword-call form parsed, startup
|
|
219
|
+
failure + root-cause error recorded). The parallel-config rules cover TP>1 real
|
|
220
|
+
logs; MoE models in full logs, recent SGLang versions and other engines are not
|
|
221
|
+
yet verified.
|
|
196
222
|
- Parsing is regex-based on log text, which changes between versions. A missed line
|
|
197
223
|
shows up as `<absent>`, never as a wrong value — please report it.
|
|
198
224
|
|
|
@@ -83,6 +83,29 @@ uva_buffers <absent> fallba
|
|
|
83
83
|
5 difference(s); 11 fact(s) identical. Absent means the log did not print it, not that it was off.
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
## Validated against real TP>1 logs
|
|
87
|
+
|
|
88
|
+
The parallel-config rules were written and checked against a real TP=8 startup log
|
|
89
|
+
posted in [vllm#48591](https://github.com/vllm-project/vllm/issues/48591) (v0.23.1,
|
|
90
|
+
8 workers, one `world_size=N` line per rank, role assignment without an ETP field):
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
parallel.world_size 8
|
|
94
|
+
parallel.roles DP rank 0, PP rank 0, PCP rank 0, TP rank 0, EP rank N/A, EPLB rank N/A
|
|
95
|
+
compile.fusions allreduce_rms
|
|
96
|
+
startup failed
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
So a TP4+EP comparison (like the one in the
|
|
100
|
+
[#63705 analysis](https://github.com/apex-mochen/servediff/blob/main/ISSUE-63705-analysis.md)
|
|
101
|
+
— a decode-only regression across vLLM 0.29–0.32) can be scripted as:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
servediff capture -o v026.log -- docker run ... vllm/vllm-openai:v0.26.0 ...
|
|
105
|
+
servediff capture -o v029.log -- docker run ... vllm/vllm-openai:v0.29.0 ...
|
|
106
|
+
servediff diff v026.log v029.log --markdown
|
|
107
|
+
```
|
|
108
|
+
|
|
86
109
|
## Dependency versions: `servediff env`
|
|
87
110
|
|
|
88
111
|
Logs do not print torch / triton / flashinfer versions, and upgrades of those change
|
|
@@ -132,7 +155,7 @@ contains `TOKEN`, `KEY`, `SECRET`, `PASSWORD`, `CREDENTIAL` or `AUTH` are replac
|
|
|
132
155
|
| KV cache layout | `Using LBNHC KV cache layout` (0.30+) | — |
|
|
133
156
|
| model loading | `Model loading took … GiB memory and … seconds` | — |
|
|
134
157
|
| torch.compile | `collected artifacts: …`, `torch.compile took … s in total` | — |
|
|
135
|
-
| startup outcome | ready / failed + root-cause error | ready |
|
|
158
|
+
| startup outcome | ready / failed + root-cause error | ready / failed + root-cause error |
|
|
136
159
|
|
|
137
160
|
Every fact keeps the log line it came from (`servediff show <log>` or `--json`).
|
|
138
161
|
A fact the log did not print is `<absent>`: servediff never fills in defaults.
|
|
@@ -170,8 +193,11 @@ Exit codes: `0` no differences, `1` differences, `2` nothing recognised.
|
|
|
170
193
|
- Tested on: log excerpts posted in vllm#47047 (v0.23) and vllm#53472 (v0.23, v0.26);
|
|
171
194
|
full startup logs of vLLM 0.28.0 and 0.30.0 and one SGLang log (single-GPU dense);
|
|
172
195
|
a real TP=8 startup log from vllm#48591 (v0.23.1, one line per worker + role
|
|
173
|
-
assignment)
|
|
174
|
-
|
|
196
|
+
assignment); a real SGLang startup log from sgl-project/sglang#4862 (v0.4.4, TP=4,
|
|
197
|
+
Qwen2.5-Omni-7B — `server_args=ServerArgs(...)` keyword-call form parsed, startup
|
|
198
|
+
failure + root-cause error recorded). The parallel-config rules cover TP>1 real
|
|
199
|
+
logs; MoE models in full logs, recent SGLang versions and other engines are not
|
|
200
|
+
yet verified.
|
|
175
201
|
- Parsing is regex-based on log text, which changes between versions. A missed line
|
|
176
202
|
shows up as `<absent>`, never as a wrong value — please report it.
|
|
177
203
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "servediff"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.6"
|
|
8
8
|
description = "Diff what your vLLM / SGLang server actually ran with: auto-selected backends, CUDA graphs, startup failures, dependency versions."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -103,7 +103,7 @@ LINE_RULES: list[tuple[re.Pattern, callable]] = [
|
|
|
103
103
|
(re.compile(r"Application startup complete"), lambda m: [("startup", "ready")]),
|
|
104
104
|
(re.compile(r"EngineCore failed to start|Engine core initialization failed"),
|
|
105
105
|
lambda m: [("startup", "failed")]),
|
|
106
|
-
(re.compile(r"^(?:\(\w+ pid=\d+\) )?(?:ERROR .*?\] )?((?:RuntimeError|ValueError|torch\.OutOfMemoryError|AssertionError): .+)$"),
|
|
106
|
+
(re.compile(r"^(?:\(\w+ pid=\d+\) )?(?:ERROR .*?\] )?((?:RuntimeError|ValueError|torch\.OutOfMemoryError|AssertionError|AttributeError|KeyError|TypeError): .+)$"),
|
|
107
107
|
lambda m: [("startup.error", m[1].strip())]),
|
|
108
108
|
# SGLang.
|
|
109
109
|
(re.compile(r"Disable prefill CUDA graph because"), lambda m: [("cuda_graph.prefill", "disabled")]),
|
|
@@ -125,6 +125,7 @@ SHARED_ARGS = {
|
|
|
125
125
|
"backend.attention_arg": ("attention_backend", "attention_backend", None),
|
|
126
126
|
"backend.moe_arg": ("moe_backend", "moe_runner_backend", None),
|
|
127
127
|
"backend.sampling_arg": (None, "sampling_backend", None),
|
|
128
|
+
"port": (None, "port", None),
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
|
|
@@ -150,6 +151,72 @@ def _literal_dict(text: str) -> dict | None:
|
|
|
150
151
|
return None
|
|
151
152
|
|
|
152
153
|
|
|
154
|
+
def _call_kwargs(text: str) -> dict | None:
|
|
155
|
+
"""Parse SGLang's `ServerArgs(kw=v, ...)` call form into a dict.
|
|
156
|
+
|
|
157
|
+
Newer SGLang prints `server_args=ServerArgs(model_path=..., tp_size=4, ...)`
|
|
158
|
+
(a keyword-argument call, not a dict literal), so `ast.literal_eval` on the
|
|
159
|
+
whole line fails and every shared arg is lost. Tolerate trailing log text.
|
|
160
|
+
"""
|
|
161
|
+
match = re.match(r"([A-Za-z_]\w*)\(", text)
|
|
162
|
+
if not match:
|
|
163
|
+
return None
|
|
164
|
+
depth, quote, end = 0, None, None
|
|
165
|
+
for i in range(match.end(), len(text)):
|
|
166
|
+
ch = text[i]
|
|
167
|
+
if quote:
|
|
168
|
+
if ch == quote and text[i - 1] != "\\":
|
|
169
|
+
quote = None
|
|
170
|
+
elif ch in "'\"":
|
|
171
|
+
quote = ch
|
|
172
|
+
elif ch == "(":
|
|
173
|
+
depth += 1
|
|
174
|
+
elif ch == ")":
|
|
175
|
+
if depth == 0:
|
|
176
|
+
end = i
|
|
177
|
+
break
|
|
178
|
+
depth -= 1
|
|
179
|
+
if end is None:
|
|
180
|
+
return None
|
|
181
|
+
inner = text[match.end():end]
|
|
182
|
+
# Split the keyword arguments at top level, then rebuild as a dict literal so
|
|
183
|
+
# ast.literal_eval accepts it (the `dict(...)` call form is not supported).
|
|
184
|
+
items = []
|
|
185
|
+
parts, depth, quote, cur = [], 0, None, []
|
|
186
|
+
for ch in inner:
|
|
187
|
+
if quote:
|
|
188
|
+
cur.append(ch)
|
|
189
|
+
if ch == quote and (len(cur) < 2 or cur[-2] != "\\"):
|
|
190
|
+
quote = None
|
|
191
|
+
elif ch in "'\"":
|
|
192
|
+
quote = ch
|
|
193
|
+
cur.append(ch)
|
|
194
|
+
elif ch in "([{":
|
|
195
|
+
depth += 1
|
|
196
|
+
cur.append(ch)
|
|
197
|
+
elif ch in ")]}":
|
|
198
|
+
depth -= 1
|
|
199
|
+
cur.append(ch)
|
|
200
|
+
elif ch == "," and depth == 0:
|
|
201
|
+
parts.append("".join(cur).strip())
|
|
202
|
+
cur = []
|
|
203
|
+
else:
|
|
204
|
+
cur.append(ch)
|
|
205
|
+
parts.append("".join(cur).strip())
|
|
206
|
+
for part in parts:
|
|
207
|
+
if not part:
|
|
208
|
+
continue
|
|
209
|
+
eq = part.find("=")
|
|
210
|
+
if eq < 1 or not part[:eq].strip().isidentifier():
|
|
211
|
+
return None
|
|
212
|
+
items.append('"%s": %s' % (part[:eq].strip(), part[eq + 1:].strip()))
|
|
213
|
+
try:
|
|
214
|
+
value = ast.literal_eval("{" + ", ".join(items) + "}")
|
|
215
|
+
except (ValueError, SyntaxError):
|
|
216
|
+
return None
|
|
217
|
+
return value if isinstance(value, dict) else None
|
|
218
|
+
|
|
219
|
+
|
|
153
220
|
def parse(text: str) -> dict:
|
|
154
221
|
facts: dict[str, Fact] = {}
|
|
155
222
|
args: dict = {}
|
|
@@ -168,7 +235,8 @@ def parse(text: str) -> dict:
|
|
|
168
235
|
put("args.source", "vllm non-default args", lineno, line)
|
|
169
236
|
elif "server_args=" in line:
|
|
170
237
|
engine = engine or "sglang"
|
|
171
|
-
|
|
238
|
+
tail = line.split("server_args=", 1)[1].strip()
|
|
239
|
+
parsed = _literal_dict(tail) or _call_kwargs(tail)
|
|
172
240
|
if parsed is not None:
|
|
173
241
|
args.update(parsed)
|
|
174
242
|
put("args.source", "sglang server_args (all args)", lineno, line)
|
|
@@ -180,8 +248,11 @@ def parse(text: str) -> dict:
|
|
|
180
248
|
for key, value in emit(match):
|
|
181
249
|
# Errors after the server reported ready (e.g. during shutdown) say
|
|
182
250
|
# nothing about how it started.
|
|
183
|
-
if key == "startup.error"
|
|
184
|
-
|
|
251
|
+
if key == "startup.error":
|
|
252
|
+
if "ready" in (facts.get("startup") or Fact()).values:
|
|
253
|
+
key = "after_ready.error"
|
|
254
|
+
else:
|
|
255
|
+
put("startup", "failed", lineno, line)
|
|
185
256
|
put(key, value, lineno, line)
|
|
186
257
|
|
|
187
258
|
if engine:
|
|
@@ -275,8 +346,17 @@ def _render_markdown(*, path_a: str, path_b: str, engine_a, engine_b,
|
|
|
275
346
|
return "\n".join(lines)
|
|
276
347
|
|
|
277
348
|
|
|
349
|
+
def _version() -> str:
|
|
350
|
+
try:
|
|
351
|
+
from importlib.metadata import version as _pkg_version
|
|
352
|
+
return _pkg_version("servediff")
|
|
353
|
+
except Exception:
|
|
354
|
+
return "unknown"
|
|
355
|
+
|
|
356
|
+
|
|
278
357
|
def main(argv=None) -> int:
|
|
279
358
|
parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
|
|
359
|
+
parser.add_argument("--version", action="version", version=f"servediff {_version()}")
|
|
280
360
|
sub = parser.add_subparsers(dest="command", required=True)
|
|
281
361
|
show = sub.add_parser("show", help="effective config facts in one log")
|
|
282
362
|
show.add_argument("log", type=Path)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: servediff
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Diff what your vLLM / SGLang server actually ran with: auto-selected backends, CUDA graphs, startup failures, dependency versions.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/apex-mochen/servediff
|
|
@@ -104,6 +104,29 @@ uva_buffers <absent> fallba
|
|
|
104
104
|
5 difference(s); 11 fact(s) identical. Absent means the log did not print it, not that it was off.
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
## Validated against real TP>1 logs
|
|
108
|
+
|
|
109
|
+
The parallel-config rules were written and checked against a real TP=8 startup log
|
|
110
|
+
posted in [vllm#48591](https://github.com/vllm-project/vllm/issues/48591) (v0.23.1,
|
|
111
|
+
8 workers, one `world_size=N` line per rank, role assignment without an ETP field):
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
parallel.world_size 8
|
|
115
|
+
parallel.roles DP rank 0, PP rank 0, PCP rank 0, TP rank 0, EP rank N/A, EPLB rank N/A
|
|
116
|
+
compile.fusions allreduce_rms
|
|
117
|
+
startup failed
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
So a TP4+EP comparison (like the one in the
|
|
121
|
+
[#63705 analysis](https://github.com/apex-mochen/servediff/blob/main/ISSUE-63705-analysis.md)
|
|
122
|
+
— a decode-only regression across vLLM 0.29–0.32) can be scripted as:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
servediff capture -o v026.log -- docker run ... vllm/vllm-openai:v0.26.0 ...
|
|
126
|
+
servediff capture -o v029.log -- docker run ... vllm/vllm-openai:v0.29.0 ...
|
|
127
|
+
servediff diff v026.log v029.log --markdown
|
|
128
|
+
```
|
|
129
|
+
|
|
107
130
|
## Dependency versions: `servediff env`
|
|
108
131
|
|
|
109
132
|
Logs do not print torch / triton / flashinfer versions, and upgrades of those change
|
|
@@ -153,7 +176,7 @@ contains `TOKEN`, `KEY`, `SECRET`, `PASSWORD`, `CREDENTIAL` or `AUTH` are replac
|
|
|
153
176
|
| KV cache layout | `Using LBNHC KV cache layout` (0.30+) | — |
|
|
154
177
|
| model loading | `Model loading took … GiB memory and … seconds` | — |
|
|
155
178
|
| torch.compile | `collected artifacts: …`, `torch.compile took … s in total` | — |
|
|
156
|
-
| startup outcome | ready / failed + root-cause error | ready |
|
|
179
|
+
| startup outcome | ready / failed + root-cause error | ready / failed + root-cause error |
|
|
157
180
|
|
|
158
181
|
Every fact keeps the log line it came from (`servediff show <log>` or `--json`).
|
|
159
182
|
A fact the log did not print is `<absent>`: servediff never fills in defaults.
|
|
@@ -191,8 +214,11 @@ Exit codes: `0` no differences, `1` differences, `2` nothing recognised.
|
|
|
191
214
|
- Tested on: log excerpts posted in vllm#47047 (v0.23) and vllm#53472 (v0.23, v0.26);
|
|
192
215
|
full startup logs of vLLM 0.28.0 and 0.30.0 and one SGLang log (single-GPU dense);
|
|
193
216
|
a real TP=8 startup log from vllm#48591 (v0.23.1, one line per worker + role
|
|
194
|
-
assignment)
|
|
195
|
-
|
|
217
|
+
assignment); a real SGLang startup log from sgl-project/sglang#4862 (v0.4.4, TP=4,
|
|
218
|
+
Qwen2.5-Omni-7B — `server_args=ServerArgs(...)` keyword-call form parsed, startup
|
|
219
|
+
failure + root-cause error recorded). The parallel-config rules cover TP>1 real
|
|
220
|
+
logs; MoE models in full logs, recent SGLang versions and other engines are not
|
|
221
|
+
yet verified.
|
|
196
222
|
- Parsing is regex-based on log text, which changes between versions. A missed line
|
|
197
223
|
shows up as `<absent>`, never as a wrong value — please report it.
|
|
198
224
|
|
|
@@ -23,6 +23,7 @@ src/servediff.egg-info/top_level.txt
|
|
|
23
23
|
tests/test_cli.py
|
|
24
24
|
tests/test_env.py
|
|
25
25
|
tests/fixtures/README.md
|
|
26
|
+
tests/fixtures/sglang-0.4.4-tp4.log
|
|
26
27
|
tests/fixtures/vllm-47047-v0.23-default.log
|
|
27
28
|
tests/fixtures/vllm-47047-v0.23-marlin.log
|
|
28
29
|
tests/fixtures/vllm-53472-v0.23.log
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
sgl start command: python3.12 -m sglang.launch_server --model Qwen/Qwen2.5-Omni-7B --model-path /home/model/Qwen/Qwen2.5-Omni-7B --host 0.0.0.0 --port 30000 --tensor-parallel-size 4 --log-level info --enable-metrics --trust-remote-code --enable-p2p-check
|
|
2
|
+
[2025-03-28 10:20:10] server_args=ServerArgs(model_path='/home/model/Qwen/Qwen2.5-Omni-7B', tokenizer_path='/home/model/Qwen/Qwen2.5-Omni-7B', tokenizer_mode='auto', skip_tokenizer_init=False, load_format='auto', trust_remote_code=True, dtype='auto', kv_cache_dtype='auto', quantization=None, quantization_param_path=None, context_length=None, device='cuda', served_model_name='/home/model/Qwen/Qwen2.5-Omni-7B', chat_template=None, completion_template=None, is_embedding=False, revision=None, host='0.0.0.0', port=30000, mem_fraction_static=0.85, max_running_requests=None, max_total_tokens=None, chunked_prefill_size=2048, max_prefill_tokens=16384, schedule_policy='fcfs', schedule_conservativeness=1.0, cpu_offload_gb=0, page_size=1, tp_size=4, stream_interval=1, stream_output=False, random_seed=94444126, constrained_json_whitespace_pattern=None, watchdog_timeout=300, dist_timeout=None, download_dir=None, base_gpu_id=0, gpu_id_step=1, log_level='info', log_level_http=None, log_requests=False, log_requests_level=0, show_time_cost=False, enable_metrics=True, decode_log_interval=40, api_key=None, file_storage_path='sglang_storage', enable_cache_report=False, reasoning_parser=None, dp_size=1, load_balance_method='round_robin', ep_size=1, dist_init_addr=None, nnodes=1, node_rank=0, json_model_override_args='{}', lora_paths=None, max_loras_per_batch=8, lora_backend='triton', attention_backend='flashinfer', sampling_backend='flashinfer', grammar_backend='xgrammar', speculative_algorithm=None, speculative_draft_model_path=None, speculative_num_steps=5, speculative_eagle_topk=4, speculative_num_draft_tokens=8, speculative_accept_threshold_single=1.0, speculative_accept_threshold_acc=1.0, speculative_token_map=None, enable_double_sparsity=False, ds_channel_config_path=None, ds_heavy_channel_num=32, ds_heavy_token_num=256, ds_heavy_channel_type='qk', ds_sparse_decode_threshold=4096, disable_radix_cache=False, disable_cuda_graph=False, disable_cuda_graph_padding=False, enable_nccl_nvls=False, disable_outlines_disk_cache=False, disable_custom_all_reduce=False, disable_mla=False, disable_overlap_schedule=False, enable_mixed_chunk=False, enable_dp_attention=False, enable_ep_moe=False, enable_deepep_moe=False, enable_torch_compile=False, torch_compile_max_bs=32, cuda_graph_max_bs=80, cuda_graph_bs=None, torchao_config='', enable_nan_detection=False, enable_p2p_check=True, triton_attention_reduce_in_fp32=False, triton_attention_num_kv_splits=8, num_continuous_decode_steps=1, delete_ckpt_after_loading=False, enable_memory_saver=False, allow_auto_truncate=False, enable_custom_logit_processor=False, tool_call_parser=None, enable_hierarchical_cache=False, hicache_ratio=2.0, enable_flashinfer_mla=False, enable_flashmla=False, flashinfer_mla_disable_ragged=False, warmups=None, debug_tensor_dump_output_folder=None, debug_tensor_dump_input_file=None, debug_tensor_dump_inject=False, disaggregation_mode='null', disaggregation_bootstrap_port=8998)
|
|
3
|
+
Traceback (most recent call last):
|
|
4
|
+
File "<frozen runpy>", line 198, in _run_module_as_main
|
|
5
|
+
File "<frozen runpy>", line 88, in _run_code
|
|
6
|
+
File "/usr/local/lib/python3.12/site-packages/sglang/launch_server.py", line 14, in <module>
|
|
7
|
+
launch_server(server_args)
|
|
8
|
+
File "/usr/local/lib/python3.12/site-packages/sglang/srt/entrypoints/http_server.py", line 673, in launch_server
|
|
9
|
+
tokenizer_manager, scheduler_info = _launch_subprocesses(server_args=server_args)
|
|
10
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
11
|
+
File "/usr/local/lib/python3.12/site-packages/sglang/srt/entrypoints/engine.py", line 546, in _launch_subprocesses
|
|
12
|
+
tokenizer_manager = TokenizerManager(server_args, port_args)
|
|
13
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
14
|
+
File "/usr/local/lib/python3.12/site-packages/sglang/srt/managers/tokenizer_manager.py", line 159, in __init__
|
|
15
|
+
self.model_config = ModelConfig(
|
|
16
|
+
^^^^^^^^^^^^
|
|
17
|
+
File "/usr/local/lib/python3.12/site-packages/sglang/srt/configs/model_config.py", line 111, in __init__
|
|
18
|
+
self.hf_text_config.hidden_size // self.hf_text_config.num_attention_heads,
|
|
19
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
20
|
+
File "/usr/local/lib/python3.12/site-packages/transformers/configuration_utils.py", line 214, in __getattribute__
|
|
21
|
+
return super().__getattribute__(key)
|
|
22
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
23
|
+
AttributeError: 'Qwen2_5OmniConfig' object has no attribute 'hidden_size'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import subprocess
|
|
2
3
|
import sys
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
|
|
@@ -268,3 +269,31 @@ def test_roles_without_etp_field_and_kv_layout_absent():
|
|
|
268
269
|
assert f["parallel.world_size"].value == 1
|
|
269
270
|
assert "ETP" not in f["parallel.roles"].value # 0.28 format lacks the field
|
|
270
271
|
assert "kv_cache.layout" not in f
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
# --- Real SGLang startup log, distilled from sgl-project/sglang#4862 ---------------
|
|
275
|
+
# SGLang 0.4.4, TP=4, Qwen2.5-Omni-7B. It prints `server_args=ServerArgs(...)`
|
|
276
|
+
# (keyword-call form, not a dict literal); the parser must handle both forms.
|
|
277
|
+
|
|
278
|
+
def test_sglang_server_args_call_form_is_parsed():
|
|
279
|
+
f = servediff.parse((FIX / "sglang-0.4.4-tp4.log").read_text(encoding="utf-8"))["facts"]
|
|
280
|
+
assert f["engine"].value == "sglang"
|
|
281
|
+
assert f["arg.tensor_parallel_size"].value == 4
|
|
282
|
+
assert f["arg.model"].value == "/home/model/Qwen/Qwen2.5-Omni-7B"
|
|
283
|
+
assert f["arg.gpu_memory_fraction"].value == 0.85
|
|
284
|
+
assert f["arg.port"].value == 30000
|
|
285
|
+
assert f["arg.backend.attention_arg"].value == "flashinfer"
|
|
286
|
+
assert f["args.source"].value == "sglang server_args (all args)"
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
def test_sglang_startup_failure_is_recorded():
|
|
290
|
+
f = servediff.parse((FIX / "sglang-0.4.4-tp4.log").read_text(encoding="utf-8"))["facts"]
|
|
291
|
+
assert f["startup"].value == "failed"
|
|
292
|
+
assert f["startup.error"].value.startswith("AttributeError:")
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
def test_cli_version_flag():
|
|
296
|
+
out = subprocess.run([sys.executable, "-m", "servediff", "--version"],
|
|
297
|
+
capture_output=True, text=True)
|
|
298
|
+
assert out.returncode == 0
|
|
299
|
+
assert out.stdout.strip().startswith("servediff 0.3")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|