Repository navigation
fix bug of undefined is_single in meth create_abort_task - #1370
Merged
Merged
Conversation
Contributor
|
Can you provide a simple demo for reproducing the issue? |
Contributor
Author
you can reproduce it via this code with any model and any launching parameter. import requests
# use your url
url = "http://localhost:10000/generate"
res = requests.post(url, json={"text": None, "stream": True}, stream=True)
print(res)sglang will raise |
timethink
pushed a commit
to timethink/sglang
that referenced
this pull request
Mar 9, 2025
|
I am using version 0.5.4.post2 for inference and the error persists. However, it seems to be non-blocking—the service keeps running and the generation results are correct. I checked the source code for 0.5.4.post2 and noticed that the modification discussed here doesn't seem to be included in this release. |
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 13, 2026
…11b's cushion breach Wand 11b (sgl-project#1377) is the open host blocker for the goal-question boot: the bounce prices 5 measured lanes x 3.00 GiB + 0.75 GiB staging = 15.75 GiB on xsn31/3's own checkpoint (front.log:111 xchg_bounce=15.75, front.log:106 lanes=5 source=measured), and the sleep-leg cushion floor (1.50 GiB) latches at 0.20 (W98 Weg2HostRateLatched) because that growth ate the room. sgl-project#1370 made the bounce PRICED HONESTLY; it did not make it SMALLER. ONE SOURCE, the --xchg-bounce-depth shape (48adc00) reused rather than a second publication path: `BounceTerms.lanes_concurrent` (0 = "not stated", byte-identical -- the same convention `max_tag_bytes` already uses two fields over) caps how many of `n_lanes` price at once through a new `lanes_priced` property; `total_bytes` reads that property instead of `n_lanes` directly. The field rides `_TERM_FIELDS`, so P, D and the host ledger recompute the identical capped total from the published inputs, never a second formula. `checkpoint_census.widest_layer_terms` and `launcher.choose_host_ledger` / `xchg_bounce_terms_for_arm` pass it through unchanged; `main()` resolves the CLI value exactly once (`xchg_bounce.resolve_lanes_concurrent`) and hands the same resolved int to both the ranks' publication call and the ledger's own call, so the two sides cannot disagree about which values are refused. REFUSAL, NOT SILENT DEGRADATION: `--xchg-lanes-concurrent 0` (or negative) is refused (W103 Weg2XchgLanesConcurrentInvalid) rather than folded into the same 0 sentinel BounceTerms uses for "unset" -- collapsing them would run every lane concurrently while the argv says the opposite. W103 is the next free number after a tree-wide census (`grep -rhoE 'W[0-9]+'` tops out at W102); W52/W53/W54/W56/W58 are a documented collision class (sgl-project#1265/sgl-project#1306) of guessed digits, so this one is taken from the census. NAMED AND COUNTED, NEVER SILENT: `WEG2-XCHG-LANES-CONCURRENT lanes_concurrent= lanes_total= lanes_priced= serialised=` is appended to the arm's own line list (appended, not inserted, so lines[0..2]'s existing positional readers are untouched) so a boot can put a number beside the flip-time cost of serialising the lanes this cap does not price. THE COMPUTED EFFECT, on xsn31/3's own geometry (largest tag 2907 MiB, 128 MiB slots -> 24 slots/lane -> 3072 MiB/lane, 0.75 GiB staging, 5 measured lanes): concurrent=2 charges 2 x 3.00 + 0.75 = 6.75 GiB (a 9.00 GiB reduction from the measured 15.75); concurrent=1 charges 3.75 GiB (12.00 GiB reduction). Against xsn31/3's own cushion_min=0.20 (floor 1.50): 0.20 - (-9.00) = 9.20 >= 1.50 at concurrent=2, and 0.20 - (-12.00) = 12.20 >= 1.50 at concurrent=1 -- the invariant holds with wide margin either way, using the boot record's own linear-tracking method (6.99 -> 0.20 explained by the +7.96 GiB bounce growth). NOTE: depth (1 vs 2) changes NOTHING on this checkpoint -- Option 1's tag-need (23 slots + 1 shadow = 24) dominates the depth floor (2 or 3) at both depth=1 and depth=2, so the entire saving here comes from lanes_concurrent alone, not from --xchg-bounce-depth. HONESTY GATE, NAMED HERE NOT BUILT: this commit wires the cap through PRICING only. `weight_updater.py`'s per-rank leg driver still allocates a buffer for every lane it owns unconditionally -- no cross-process concurrency permit exists yet, so a real boot's tmpfs usage may still reach `lanes_total`'s worth even though the ledger now charges `lanes_priced`. A WEG2-XCHG-LANES-CONCURRENT-CAVEAT line names this explicitly whenever a cap actually serialises lanes, pointing at the same 3-way measurement (sgl-project#1358: tmpfs holders, cgroup d_shmem, host-slot lines) that must confirm the real peak before this ARM number is trusted. Tests: test_weg2_xchg_lanes_concurrent_1385.py, 23 cases (hermetic, CUDA_VISIBLE_DEVICES=""), covering the default byte-identical path, the cap actually shrinking the charge (the mutant guard for the OOM direction -- manually verified: reverting `lanes_priced` to `n_lanes` in `total_bytes` fails 3 tests immediately, restored after), refusal for N<1, the W103 census-not-guess check, the named/counted log line (source and execution smoke through a real fake checkpoint), and the one-source property (single `resolve_lanes_concurrent(` call in `main`, both call sites take the same resolved value). test_weg2_widest_layer_census_1332b.py's line-count assertion updated 3->4 for the new appended line (positional indices unchanged). 193 tests green across the full bounce/lane/ledger neighbour suite plus the new file; ruff clean. Default is byte-identical: lanes_concurrent=0 is the "not stated" sentinel, `lanes_priced` returns `n_lanes` unchanged, and no existing caller passes the new keyword.
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.

Motivation
According to the current logic in
GenerateReqInput.post_init, when neithertextnorinput_idsare provided, theis_singlefield will not be dynamically set. This results in anAttributeErrorbeing triggered inTokenizerManager.create_abort_task.Additionally, dynamically setting fields in a dataclass is not a good practice. The fields in a dataclass should all be predefined.
Modifications
I just add predefined field
is_single: bool = Trueto classGenerateReqInputandEmbeddingReqInputChecklist