执行摘要
EC Connector 新增 pending push 检测
让 EC Connector 能够像 KV Connector 那样,通过 has_pending_push_work() 通知引擎主循环仍有推送传输工作正在进行,防止引擎在推送传输完成前退出。
此 PR 为简单接口扩展,设计清晰,实现安全。值得关注的点是如何在子类中实际利用该钩子。
无 Review 讨论。NickLucche 直接批准,无评论。
让 EC Connector 能够像 KV Connector 那样,通过 has_pending_push_work() 通知引擎主循环仍有推送传输工作正在进行,防止引擎在推送传输完成前退出。
此 PR 为简单接口扩展,设计清晰,实现安全。值得关注的点是如何在子类中实际利用该钩子。
无 Review 讨论。NickLucche 直接批准,无评论。
vllm/distributed/ec_transfer/ec_connector/base.py 的 ECConnectorBase 类中添加 has_pending_push_work() 方法,返回 False,供子类覆盖。vllm/v1/core/sched/scheduler.py 的 has_requests() 方法中增加对 ec_connector.has_pending_push_work() 的检查,与已有 connector.has_pending_push_work() 并列。| 文件 | 模块 | 状态 | 重要度 |
|---|---|---|---|
vllm/distributed/ec_transfer/ec_connector/base.py |
分布式连接器 | modified | 6.49 |
vllm/v1/core/sched/scheduler.py |
调度器 | modified | 5.51 |
vllm/v1/core/sched/scheduler.py
core-logic
在 has_requests 中增加对 ec_connector 的 pending push 检查,保持引擎活跃
def has_requests(self) -> bool:
# Override the interface default to also keep the engine alive while a
# connector still has pending push work (e.g. push-mode WRITE transfers
# in flight after all "live" requests have finished). Without this hook
# the engine would quiesce before the connector can drain completions.
# TODO: replace with a more general mechanism for connectors to keep
# the scheduler alive.
return (
self.has_unfinished_requests()
or self.has_finished_requests()
or (self.connector is not None and self.connector.has_pending_push_work())
or (
self.ec_connector is not None
and self.ec_connector.has_pending_push_work()
)
)
当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。
改动极小,新增方法默认返回 False,不影响现有 EC Connector 行为。Scheduler 侧增加的条件是安全短路逻辑,不会有性能影响。风险极低。
对使用 EC Connector 并实现推送传输的模型(如 EPD)有益,能正确保持引擎活跃直到传输完成。其他模型无影响。
当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。
参与讨论