Skip to content

Support random dataset in bench_serving.py - #669

Merged
merrymercy merged 4 commits into
mainfrom
add-random
Jul 20, 2024
Merged

merrymercy merged 4 commits into
mainfrom
add-random

Conversation

@merrymercy

Copy link
Copy Markdown
Collaborator

No description provided.

@merrymercy merrymercy changed the title Add random dataset Support random dataset in bench_serving.py Jul 20, 2024
@merrymercy
merrymercy merged commit 35759ef into main Jul 20, 2024
@merrymercy
merrymercy deleted the add-random branch July 20, 2024 08:06
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
cen121212 pushed a commit to cen121212/sglang that referenced this pull request Nov 10, 2025
* migrate daily build and pr

* Update daily-build-test-npu-innersource.yml

* Update pr-test-npu.yml

* Create pr-test-npu-debug.yml

* Update pr-test-npu-debug.yml

* Update pr-test-npu.yml

* Update pr-test-npu-innersource.yml

* Update daily-build-test-npu-innersource.yml

* migrate daily build and pr

* Update npu_ci_install_dependency.sh

* Create pyproject_npu.toml

* Update npu_ci_install_dependency.sh

* Update pr-test-npu-debug.yml

* Update pr-test-npu-innersource.yml

* Delete python/pyproject_npu.toml

* Update pyproject_other.toml
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 15, 2026
Four entries: the solved break-even and its self-printing provenance, the
stranding surcharge priced against its own counterfactual, the drain-based
prefill exit with the SLO-solved residency cap, and the boot-time seam
projection.

The last one carries the falsified chunk-width fit with it, deliberately. It
reproduced all three of its anchors and was still wrong, because the anchors
were one per rank and the curve tracked per-rank offsets rather than the
variable it named -- caught only by a held-out point. That is worth more as a
recorded lesson than as a deleted mistake.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
…e rules outrank it

Wiring for 59592d6, plus both review findings, plus three precedences the
EXISTING TESTS taught me -- which is the substance of this commit.

FINDING 1, THE TP MIRROR. The tp branch pulled unconditionally on pend>0, so
after an EXHAUSTED release the next TP evaluation would pull straight back and
decode would lose the layout before serving anything: the C2 defect with the
phases swapped, degenerating under both-sides load to max_hold PP rounds, ~0 TP
rounds and TWO seams per cycle -- strictly worse than the timer it replaced.
The pull now yields to a RUNNING decode batch for MIN_DECODE_ROUNDS (2: the
minimum that means "did not preempt mid-batch"), bounded so it cannot become a
new starvation of the prefill side. The degenerate cycle is pinned by test, not
by hope: release at the bound, then assert the pull does NOT come straight back.

FINDING 2, THE COUNTER LIFECYCLE. hold_rounds_so_far was caller-maintained.
next_hold_rounds() is now a pure function resetting on EITHER boundary -- phase
change or pending reaching 0 -- and the defect it prevents is pinned directly:
a stale counter of 8 carried across a phase change releases the very first hold
of the next episode, i.e. the C2 fix evaporates for the arrival that needed it.

FINDING 3, THE REASONS REACH THE LOG. The gate returns its verdict as the
decision's reason, so it travels the same path BOTH BLOCKED already does -- that
is how the boot's acceptance gets read.

THE THREE PRECEDENCES, each taught by a test I broke:
  * sgl-project#688 idle-locked outranks it, exactly as it outranks sgl-project#689 formation:
    holding a layout that can build NOTHING is waiting inside a layout that
    cannot serve.
  * The DRAINED exit outranks it on sgl-project#669's economics: a residual ABOVE one
    chunk stays (which this hold wants anyway), but a SUB-CHUNK residual is
    finishing regardless and holding for it spends a ~2.6 s seam to save a
    fraction of a chunk. sgl-project#669 moved anti-pinning to the starvation cap
    precisely so the drain could exit.
  * The DECODE STARVATION CAP outranks it absolutely. That SLO is the system's
    guarantee that PP can never pin the server; this lever's round bound is
    only a secondary backstop. Vetoing the cap would put a local timer above a
    global guarantee and reintroduce the pinning it prevents.

AND THE GATE IS PP_TO_TP ONLY, as sgl-project#689's is. My first wiring vetoed EVERY arm,
including the idle return leg -- 11 tests red -- because the rules arm for
reasons this lever cannot see. It may only convert the one arm that contradicts
it. Recorded because three exemptions is a shape: if a fourth appears, invert to
an allowlist rather than adding it.

Tests: 22 passed + 17 subtests in the lever file; 221 passed + 24 subtests
across phase-policy, idle-locked-arm, window-formation, admission-intake, 708
and flip-runtime. ruff clean.
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.

1 participant