Repository navigation
Conversation
xs1997zju
marked this pull request as ready for review
November 23, 2026 09:32
This branch has not been deployed
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.
现象与修复
启用跨权重更新 rollout 后,SessionServer 的单次模型 HTTP 请求超时,可能留下未结算的 lease。后续暂停时,RequestGate 拒绝 drain,训练无法进入下一次更新。
本次参考 preview 分支的 连接前超时结算 与 已发送超时恢复,适配 #2297 重构后的 main:
未知取消、控制 RPC/drain 等待超时、拓扑变化、sleep 或清理失败仍阻止发布。sleep 可能终止同后端其他工作,未识别的失败不会被统一清空。本次没有新增模型请求重试或采样期恢复循环,不承诺未收齐 batch 的所有故障都能到达暂停入口。
验证
实验准备中暴露的漏配IPC、旧PT字段/长度摘要兼容、eager大词表loss OOM均只修正独立实验入口;生产HTTP补丁未因此扩大。最后使用main原生chunk loss1024保留完整数据,不宣称完成chunk/eager数值等价基准。
CPU 缩短超时用于故障注入,不代表复现历史3600秒卡顿的网络根因;不将少量探针当作完整 CyberGym、64卡或收敛验收。
独立 XT Review
以下4张图来自本地最终固定提交的完整独立 review。图中黄色节点表示新增或修改的恢复逻辑;正常请求继续沿用原有暂停与权重发布流程。
改前:模块关系
classDiagram RolloutController "1" --> "1" RolloutRequestState RolloutRequestState "1" --> "0..1" RequestBarrier RolloutController "1" --> "1..*" LMDeployWorker RequestBarrier "1" --> "1..*" SessionServerActor SessionServerActor "1" --> "1" SessionServer SessionServer "1" --> "0..1" RequestGate RequestGate "1" --> "0..*" RequestLease SessionServer "1..*" --> "1" TraceStore : shared singleton actorSessionServer 每个请求入口一个;TraceStore 为既有共享 actor,不是本次新增 singleton。
改前:请求超时后阻塞权重更新
改后:在现有模块中增加恢复接口
classDiagram RolloutController "1" --> "1" RolloutRequestState RolloutRequestState "1" --> "0..1" RequestBarrier RolloutController "1" --> "1..*" LMDeployWorker : sleep recovery receipt RequestBarrier "1" --> "1..*" SessionServerActor SessionServerActor "1" --> "1" SessionServer : settle after sleep SessionServer "1" --> "0..1" RequestGate RequestGate "1" --> "0..*" RequestLease : exact failed set settlement SessionServer "1..*" --> "1" TraceStore : release failed session ownership class RolloutController { _recover_http_timeouts() } class LMDeployWorker { sleep_for_timeout_recovery() } class SessionServer { _forward_timeouts settle_after_backend_sleep() } class RequestGate { settle_after_backend_sleep() }图中的带方法/字段类为修改部分;没有新增行为类,main 的数量关系保持不变。
改后:区分未发送和已发送的超时
flowchart TD subgraph S[SessionServer._forward_request / _forwarding_client] S1[HTTP timeout] --> S2{connect timeout and never sent?} S2 -->|yes| S3[failed receipt; release via existing gate finally] S2 -->|no| S4[remember exact timeout lease] end subgraph C[RolloutController._seal_and_drain_requests / _recover_http_timeouts] C1[freeze and seal] --> C2[drain] C2 -->|known HTTP failures only| C3[native backend sleep receipts] end subgraph L[LMDeployWorker.sleep_for_timeout_recovery] L1[level2 sleep returns] --> L2[authenticated is_sleeping confirmation] end subgraph T[SessionServer.settle_after_backend_sleep / RequestGate.settle_after_backend_sleep] T1[validate identity and local forward exits] --> T2[release failed traces] T2 --> T3[settle exact active and failure set] end S4 --> C2 C3 --> L1 L2 --> T1 T3 --> C4[drain again; original pause/train/publish] classDef changed fill:#fff1cc,stroke:#b7791f class S2,S3,S4,C3,L1,L2,T1,T2,T3 changed审阅过程与最终结论
由独立子 agent 完整读取并执行赵的 xt-review 原始 prompt、RL补充及架构技能,进行了四轮审阅和修改:
a3b3ff390e5f8c0b852578ee0e1007c36d6137af。最后一轮代码审阅结论:未发现未解决的代码阻断问题。 单卡A/B及本机4卡训练/IPC结果另行独立核验证据;实验入口失败历史保留,不将准备失败计作目标复现。
最终独立证据复核结论:最终轮代码 review 未发现未解决的代码阻断;CPU、单卡真实GPU A/B,以及本机4卡的“HTTP超时恢复→完整历史组一次训练更新→原生IPC→更新后请求”机制验证通过。 固定SHA仍为
a3b3ff390e5f8c0b852578ee0e1007c36d6137af。完整本地各轮报告及交互修改记录已保留,正文仅公开脱敏结论。