refactor(connector): restore pipeline behavior and boundaries#92
Merged
Conversation
- isolate worker load, store, memory, and runtime responsibilities - centralize scheduler request lifecycle and immutable store intents - narrow staging to tensor transforms and document ownership flows - preserve TP2 cold and warm cache behavior with regression coverage
- move load and store state machines behind pipeline operation APIs - retain worker and scheduler adapters while narrowing runtime coordination - propagate delayed tensor-parallel geometry into pipeline ownership - select the staged CUDA device before background IPC export - remove duplicated config state and private compatibility surfaces
- separate scheduler and worker implementations into role-owned packages - restore concurrent streaming load and store pipeline behavior - cap independent fixed staging pools under one 6 GiB worker budget - restore load diagnostics and strengthen drain and tier benchmark gates - add behavior-contract coverage and update connector design documentation
- declare torch, vLLM, and CuPy requirements before connector imports - keep worker pipeline behavior tests active in full development environments
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
SchedulerConnectorMixinandWorkerConnectorMixinas separate vLLM role adapters.daser/connector/scheduler/and worker implementation underdaser/connector/worker/.Architecture
DaserConnectorremains the vLLM composition root. Scheduler and worker implementation packages do not import each other.RequestLifecycleowns scheduler request state and synchronous control-plane IPC.WorkerRuntimeowns finalized KV geometry, step metadata, pipeline configuration, and coordinated shutdown.LoadPipelineowns load queueing, fixed staging leases, IPC, restore, diagnostics, failure invalidation, and completion.StorePipelineowns deferred saves, producer ordering, fixed staging leases, transfer, commit, and completion.No pipeline ABC, generic dispatcher, compatibility re-export layer, or variable-size CUDA allocator was added.
Behavior restored
Staging memory
Load and store retain independent fixed pools so store traffic cannot consume load buffers. One startup calculation enforces a combined ceiling of
6144 MiBper worker and reserves at least one buffer for each direction.The TP2 validation run selected load depth 3 and store depth 2:
Both are below the 6 GiB ceiling (
6,442,450,944bytes).Validation
pre-commit run --all-filespytest -q tests/connector(119 passed)pytest -q tests/server tests/transfer(154 passed)106 passed)pytest -q -m "not integration and not slow"(353 passed, 100 deselected)Performance parity
The PR evict run completed with
l1_hits=176,l1_misses=880, andl2_reads=880. Its complete warm phase mean TTFT was 553.52 ms and prompt throughput was 278,552.04 tok/s.Cold/warm exact match was 98% on both master and the PR, so the remaining mismatch predates this refactor.
mypy .remains blocked by the repository's existing duplicate-module discovery (configanddaser.config) and pre-existing annotation errors outside this change.