Repository navigation
[minor] fixed code formatting doc - #896
Merged
Merged
Conversation
- the doc was missing code block quotes
zhyncs
approved these changes
Aug 2, 2024
timethink
pushed a commit
to timethink/sglang
that referenced
this pull request
Mar 9, 2025
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 26, 2026
…e-policy knob's value came from) into the flip train # Conflicts: # python/sglang/srt/managers/phase_policy.py
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 26, 2026
The merge-regression pass runs ruff with the repo's OWN selection (.pre-commit-config.yaml: --select=F401,F821,UP037), not ruff's defaults -- the default run reports 575 findings on these files and measures a gate nobody enforces. Under the enforced selection: 0 F401, 0 F821, 22 UP037. Nineteen were already there at 0cd27d9, measured rather than assumed by running the same selection against the base blobs of the same files; three are new, all in phase_policy.py, all forward references introduced by sgl-project#889/sgl-project#893 (effective_pp_exit_term, stranded_decode_s, superseded_pp_bound_warning). Fixed all 22 rather than the 3. Both files carry `from __future__ import annotations`, so the quotes are inert and their removal is the autofix the hook itself applies; fixing only the new three would leave the file split between two conventions, and leaving all 22 hands the next toucher a pre-commit failure they did not cause. 91 passed across the suites over both files (sgl-project#889, sgl-project#893, sgl-project#896, the arm outcome suite, sgl-project#838 layout conformance) after the rewrite. Codespell, for the record, is NOT clean and is not made clean here: 12 hits on train-touched files against 11 at the same base. The single new one is "oder" in test_one_chunk_tp_prefill_887.py:8 -- inside a verbatim German user directive the test quotes as its premise, the same class as the "egal" quote that has sat at phase_policy.py since before this train. A quote is not a typo, and rewriting one to please a dictionary would falsify the record it exists to preserve.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 13, 2026
…e reading now name their input (23a) THE BOUNCE STATE, BESIDE THE BOUNCE TERM. The exchange seat measured THREE distinct states that all price 2.16 GiB: (depth=1, comparing=True), (depth=2, comparing=False), and (depth=2 under the pre-sgl-project#1335 expression that under-priced by one widest layer). The figure alone cannot tell a correctly priced shallow arm from the underpricing. I proved that the hard way and it is why this commit exists rather than being a tidy-up. I read 2.16 off my own dry run, told the exchange seat the cause was `depth=1`, and was wrong: my branch forked from 9c22254 and simply did not carry his fix. It was his THIRD case. Same number, three causes, wrong one picked -- two messages after he had written the three cases out for me. The wrong attribution had already gone to the boot seat and the coordinator. Every ARM line now carries `bounce_depth=`, `bounce_slots=`, `bounce_inject=` beside `xchg_bounce=`, and `bounce_state=absent` when the arm pins no bounce at all -- an unpriced state and a state priced at defaults must not share a spelling, the rule the ratchet fields already obey. `slots` comes from `xchg_bounce.assemble_slots`, the one authority (sgl-project#1335), never a second expression. `inject_mode` is resolved in the launcher's own process, which is exactly the term a desk run and a boot can disagree about -- printing it makes the disagreement readable instead of hidden inside an equal number. (23b) WHICH INPUT PRODUCED S_D. `_derive_d_l2_budget` lets a measured ownership vector in the sizing record OVERRIDE `--d-cap-rank-share`, silently. The boot seat read `S_D=1` off its own sizing table while the ARM line said `S_D=2`. Effective and unprinted: sgl-project#896. The line now reads `S_D=2 (sd_share=0.3750 source=record)` or `source=flag`. A terms dict written before this commit prints `source=unknown`, NOT `flag`: absence cannot testify, and guessing the flag would be the same error as reading an absent `pids` field as an empty one ([22-fix5b], four commits ago). BOTH ARE PRINT-ONLY. Neither moves an arm. `xchg_bounce_prov` stops at `choose` and never enters `price` -- a term only the printer needs must not be threaded through the pricing path, where a later reader would have to prove it does not move a number. A test asserts it is absent from `price`'s signature. MEASURED, serving form, form key 24eb56724d73, quiet box (cards 4/4/4): ARM S=1 M=2400 S_D=4 (sd_share=0.4000 source=flag): anchors=9.49 rings=12.83 overhead=0.89 xchg_bounce=2.86 bounce_depth=2 bounce_slots=3 bounce_inject=shadow host_weights=46.40 ratchet_per_flip=8.70 ... 2.86 on the same invocation that printed 2.16 before -- which is how the misattribution surfaced at all. TESTS (7, red-first on c73c361: 5 failed / 2 passed). The load-bearing one is `test_two_states_with_the_SAME_price_are_distinguishable`: two differently priced states with an equal term must produce different lines. That is the property whose absence produced the wrong attribution, asserted directly rather than via the fields that happen to implement it today. ruff clean. (cherry picked from commit 20ddcde)
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
Improve doc.
Modification
Checklist
pre-commit run --all-filesor other linting tools are used to fix potential lint issues.