vllm_omni.engine.duplex.session.context ¶
Shared state for :class:DuplexSessionRunner and its components.
The runner is a state machine that several components read and write. Splitting it into modules only helps if the shared part stops being implicit: a component holding a back-reference to the runner is a mixin with extra steps, and one holding its own copy of a flag diverges from the others.
So the mutable part is named. DuplexRunState is the small set of flags that more than one component touches -- grep "\.run\." finds every mutation -- and DuplexSessionContext is the read-mostly collaborator bundle everything is constructed with. Anything a component needs from the runner that is neither of those is infrastructure, and goes through :class:RunnerServices.
DuplexAppendTaskMeta dataclass ¶
DuplexRunState dataclass ¶
Mutable per-run flags shared by the runner and its components.
Every field here is written by one component and read by another; that is the criterion for being in this object rather than private to a component.
DuplexSessionContext dataclass ¶
Collaborators one session's components are built with.
Read-mostly: the session and the model state are mutated through their own APIs, not by rebinding these fields. The mutable flags live in run.
DuplexSessionTasks dataclass ¶
RunnerServices ¶
Bases: Protocol
The only things a component may ask the runner for.
Deliberately two methods. A component that needs more than task scheduling from the runner is reaching for orchestration that belongs in the runner.
StageOutput dataclass ¶
One stage result, queued for the session that owns the request.