sa3: make the pipeline submit queue cap configurable - #318
Open
ryanontheinside wants to merge 1 commit into
Open
sa3: make the pipeline submit queue cap configurable#318ryanontheinside wants to merge 1 commit into
ryanontheinside wants to merge 1 commit into
Conversation
StreamPipeline.submit() documents queue_cap=1 as the intended policy for callers that re-submit every tick, and SA3Backend._generate does exactly that -- but _build_pipeline never passed it, so the cap fell back to the historical default of `depth`. With depth < steps the queue sits full, and a knob move (denoise, seed, the bundle a prompt swap publishes) waits behind up to depth-1 stale requests before it can reach a ring slot. ACE's StreamDenoise node has passed queue_cap=1 since the option was added; SA3 was the one caller left on the default. Flipping that default is a live behavior change to the shipped product, so this only adds the dial: a `queue_cap` ctor kwarg (None = unchanged) plus a DEMON_SA3_QUEUE_CAP env override for A/B-ing a running server. Env-var rather than a SessionConfig field because this is a measurement dial, not a client control -- the wire contract and its generated TS types stay untouched until the Phase 0 sweep harness says which policy SA3 should ship.
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.
Summary
StreamPipeline.submit()documentsqueue_cap=1as the intended policy for callers that re-submit every tick, butSA3Backend._build_pipelinenever passed it, so the cap fell back to the historical default ofdepth. Withdepth < steps, the queue sits full and a knob move (denoise, seed, the bundle a prompt swap publishes) waits behind up todepth - 1stale requests before it can reach a ring slot. ACE'sStreamDenoisenode has passedqueue_cap=1since the option was added; SA3 was the one caller left on the default.Flipping that default is a live behavior change to the shipped product, so this PR only adds the dial: a
queue_capctor kwarg (None= unchanged) plus aDEMON_SA3_QUEUE_CAPenv override for A/B-ing a running server. It's an env var rather than aSessionConfigfield because this is a measurement dial, not a client control — the wire contract and its generated TS types stay untouched. Flipping the default itself is deliberately left for a follow-up.Test plan
python -m pytest tests/unit/test_sa3_backend.py -q— 19 passed