Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ sources: []
- [Model Executor — NPU KV cache 布局规则](rules-npu-kv-layout.md)
- [Model Executor — Dynamo/cudagraph compile guard rules](rules-compile-guard.md)
- [Model Executor — INC/AutoRound 量化配置规则](rules-inc-autoround.md)
- [Model Executor — Orchestration Loop Rules](rules-orchestration-loop.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Model Executor — Orchestration Loop Rules"
created: 2026-10-13
updated: 2026-10-13
type: rule
tags: [vllm-omni, components, model-executor]
sources: ["PR #8675"]
---

# Model Executor — Orchestration Loop Rules

## VLLM-OMNI-PR8675-ORCH-LOOP-DEFAULT — 双 orchestration loop 必须共用同一 StagePool 读路径,成员变更唤醒 dispatcher

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Merge the orchestration update into the serving rule

This creates a second owner for an existing contract: components/serving/_index.md:37 already routes event-driven orchestration to rules-engine-lifecycle.md:177-182, while configuration/environment-variable-contract.md:22 also documents this flag. Those retained pages still prescribe the legacy default, direct reader call, periodic reconciliation, and flag-controlled serving drain, directly contradicting this new page. Because normal routing reaches those existing pages rather than this model-executor page, reviewers will continue enforcing the obsolete behavior; update/retire the existing serving and configuration conclusions union-first instead of adding a parallel rule.

AGENTS.md reference: AGENTS.md:L11-L17

Useful? React with 👍 / 👎.


- 触发:修改 `vllm_omni/engine/orchestrator.py` 的 stage-output loop(event-driven 或 legacy 1 ms poll)、`vllm_omni/engine/stage_pool.py` 的读取/成员接口(`add_client`、`remove_client`、`mark_replica_unavailable`、`evict_replica`),或 `VLLM_OMNI_EVENT_DRIVEN_ORCH` 的默认值与解析。
- 强制:env 未设置即对所有 pipeline 启用 event-driven loop;`1`/`true`/`yes`/`on` 保持启用,其余值(含 `0`/`false`/`no`/`off` 及任何未识别值)选择 legacy poll;值做 strip 与大小写归一化,在 `Orchestrator` 构造时解析,不再有 per-pipeline 默认。两条 loop 的 stage 输出读取必须收敛到同一 `StagePool.read_llm_raw_output`(原 `_poll_stage_raw`),保证 dict pooling 的 `pooling_output_payload` 等在两条路径上一致 rehydrate。pool 成员变更必须唤醒 dispatcher 以触发 reader reconcile,使运行时新挂载的 replica 无需等 0.5 s tick 才被首次 drain;reconcile 在 dispatcher 内执行,可能排在于途 output-routing await 之后——唤醒是及时的,但不保证即时完成,0.5 s tick 保留作 backstop。serving-side final-output loop 的唤醒独立于该 flag(#8703 之后),本规则只约束 orchestrator stage-output loop。
- 禁止:重新引入 per-pipeline 默认管道(`_event_driven_orch_default_for_pipeline` 或 `event_driven_orch_default` ctor 参数);在任一 loop 里绕过 pool 读 helper 直接 `client.get_output_async()`;用手工挑选的 parity 清单替代把 orchestrator scenario 测试在两条 loop 上参数化;把成员变更唤醒表述为保证即时 reconcile 的同步语义;把默认切换表述为吞吐/延迟改善——其证据边界是空闲 CPU 下降,吞吐与延迟预期不变。
- 验收:单测在 env 未设置与 `VLLM_OMNI_EVENT_DRIVEN_ORCH=0` 两种条件下运行;`tests/engine/test_orchestrator.py` 与 `test_orchestrator_error_handling.py` 通过参数化 fixture 覆盖两条 loop;新增读取或成员路径时断言 pooling payload rehydration 在两条 loop 行为一致,且成员变更后 reader 集合最终与 pool 成员一致(允许等待在途 output-routing 完成,不要求瞬时);启动日志仍记录所选 loop 模式与 reader/poller 计数。^[PR #8675]

<!-- kb:rule status=active since=v0.30.0 -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not mark the unmerged behavior active in v0.30.0

At this commit's timestamp, upstream PR #8675 is still open and describes commit d4157eb on a vLLM 0.31.0 base, so the all-pipeline default and new StagePool.read_llm_raw_output contract are not v0.30.0 behavior. Marking the rule active since=v0.30.0 exposes proposed branch behavior as a current released invariant, causing reviews of main/v0.30 to demand APIs and defaults that are absent there; keep it inactive until merge or bind activation to the actual merged SHA/release.

AGENTS.md reference: knowledge/AGENTS.md:L16-L16

Useful? React with 👍 / 👎.

Loading