Repository navigation
Conversation
Preserve committed attempt token ranges and successful publication sequences through Session export and TransferQueue. Report final-mask-weighted ages at actual consumption, separating generation changes from post-generation wait. Reuse existing dumps and logs, and provide CPU diagnostics and a GPU smoke recipe. Unknown provenance remains explicit without changing GRPO semantics.
|
Thanks for contributing to Relax, @aayc123! 感谢你为 Relax 做出贡献! 📚 Contribution guide / 贡献指南Describe the problem, your changes, and how you validated them. Keep each PR focused and run 请说明问题、改动和验证方式,保持 PR 聚焦,并在提交前运行 🛠️ CI commands / CI 指令
Put one command on the first line of a new PR comment. Rerun/cancel require PR authorship or repository write access. 在新 PR 评论的首行写一条指令。PR 作者或有仓库写权限的贡献者可以重跑、取消 CI。 🔎 Merge requirements / 合入条件GitHub:⏳ 合入条件未满足
|
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论
已完成固定提交 4199fd220f3ecc6cf94e241e505e4eaea4dfeeda 的范围与行为审查,未确认需要修改的问题。已核对 Agentic 片段来源、成功发布序号、TransferQueue 往返、最终 loss mask 加权、VPP/dummy 排除和 DP 广播;定向 CPU 节点通过。GPU/TP/PP/CP/多节点组合未在本轮验证。
审查看板:#549 (comment)
|
@SigureMo 请帮忙批准最新提交的 CI 运行,刚解决了一个冲突,谢谢! |
Read Hybrid consumption versions from its DCS publisher. Register a publication only when every PP source reports the same nonempty receiver set; keep audit provenance unknown after an inconsistent publication. Preserve the existing generation resume and receiver handling behavior. Cover Hybrid consumption, disjoint and partial PP receivers, missing IDs, and persistent invalidation with regression tests. All 58 focused tests and the full pre-commit checks pass.
|
/review |
Remove the stale push_failed guard left by the main merge. Share one raw PP receiver snapshot between strict publication auditing and the routing intersection returned by rank zero after a successful resume. Keep missing receiver identities unknown and preserve managed LoRA and actor-fwd-only publication paths. Update the eager Session permit mock to accept the audit keywords and align existing CPU tests with backend returns. Validation: 66 focused CPU tests and full pre-commit checks pass. GPU/NPU and multi-node integration remain unverified locally.
Model the backend's confirmed recipient return value in recovery registration tests. Verify the client preserves the returned list and forwards update flags without repeating recipient collection. Retain PP, rank and adapter safety coverage in the existing backend lifecycle tests. Validation: 63 focused CPU tests pass. The wider local run has 661 passes and 10 Bridge conversion failures reproduced on the unmodified PR head with the same existing local image.
Allow the client to return an equivalent recipient list while preserving content and forwarded-option checks.
Request audit metadata through the shared actor training field builders. Record publications before generation resumes and reuse the backend's confirmed recipients when verifying replacement rollout engines.
Check that two new requests acquire the released permits and a third waits after a duplicate release. Check cancelled provenance for emptiness and use the publication ledger and consumption snapshot to verify that DCS audit invalidation survives a later healthy sync.
| for permit_id in ("third", "fourth"): | ||
| assert await asyncio.wait_for(coordinator.acquire_request_permit(permit_id), timeout=1) | ||
| waiting = asyncio.create_task(coordinator.acquire_request_permit("fifth")) | ||
| await asyncio.sleep(0) # Let the request reach the semaphore. |
There was a problem hiding this comment.
sleep(0) 让出一次事件循环。如果获取路径先在别处挂起,再错误地绕过容量检查,测试仍会看到任务未完成,并在它返回成功前将其取消。建议在真实 Semaphore.acquire() 的入口设置事件,用带超时的等待确认第五个请求到达容量检查,再断言它仍在等待。用 finally 取消并等待任务,保留真实信号量的行为。 仓库测试准则
Wait for the request to reach the real semaphore and record whether capacity is exhausted at entry. This catches both a capacity bypass and an extra grant followed by a suspension. Always cancel and await the pending request when the check finishes.



What
为 Agentic 训练增加权重来源与消费滞后的旁路审计。记录成功提交的生成片段及其 token 区间,沿现有数据链路关联到实际训练消费,输出可追溯到 Session、轮次和片段的诊断报告。
验证结论:已验证工具等待跨两次发布的 token 来源,以及生成完成后排队跨一次发布的消费滞后。 当前提交的 CPU 定向回归为 105 passed,新增真实 TransferQueue 审计字段往返测试单独执行 1 passed。下表为此前实现的 GPU 验证结果;本轮对齐最新 main 后未重跑 GPU。
两组报告的版本与年龄缺失率均为 0。这里验证的是来源与年龄统计,不代表审计开启前后的 GPU 参数更新逐位等价验证。
Why
异步多轮生成可能在工具等待期间跨越权重发布,完成后还可能排队等待训练。现有
Sample.weight_versions是扁平列表,无法恢复各次生成对应的 token 区间,也没有关联真实训练消费时刻。No.15 要求区分生成期间的版本变化和生成后的等待,并按实际训练 token 统计消费年龄。原始版本标签可能在未发布 rollout 权重时递增,因此年龄使用同一策略的成功发布序号计算。
Relates to #321。本 PR 基于
main,独立完成生成来源、发布记录、训练消费和诊断示例,无前置 PR 依赖。How
--save-debug-train-data输出报告,提供 CPU 工具等待示例、dump 汇总工具和 GPU 复现脚本。不新增运行依赖或训练 CLI 参数,沿用采样、奖励、loss mask 和 GRPO 分组语义。Testing
证据来源: 本轮提交
4199fd2,基于main的0098f4c;GPU 结果来自 2026-11-01 的本地实现,早于本轮 main 对齐,本轮未重跑。pre-commit run --all-files --show-diff-on-failure通过;复现脚本通过 shell 语法检查。未运行全仓库测试。本轮未申请 GPU / 多节点验证资源,未重跑 GPU 集成测试;GPU TP/PP/CP 和多节点组合尚未验证。已有原训练字段一致性回归及非零梯度实训证据,未进行审计开启前后的 GPU 参数更新逐位对照。
pre-commit run --all-filespassespytest tests/)Type of Change
Screenshots / Logs
展开验收数据:统计口径、工具等待示例、实训结果与支持边界
统计口径
版本年龄按同一策略 epoch 内的成功发布序号计算。设片段来源为 v、生成结束快照为 e、训练消费快照为 c:
完整已知时,逐片段满足“消费年龄 = 生成年龄 + 生成后等待”。工具 observation 占据 continuation 坐标,但不计入有效 token。跨 DP 汇总使用计数及加权和,不平均各 rank 的均值。
可复现 CPU 示例
使用真实 SessionForest、转换器和 TensorDict 模拟成功发布,不执行 GPU 推理训练:v10 生成 4 token,工具等待期间发布 v11、v12,工具返回 3 个 mask=0 的 observation token,v12 再生成 6 token;消费前发布 v13。
双卡实训核验
DP2 三轮合计 12 条样本、809 个有效 token,两个训练 rank 的消费快照每轮一致,无重复或遗漏。四个长任务来源序号为 [1,3],生成跨度为 2,生成后等待为 0。三轮梯度范数为 16.6030、14.0032、15.5722。
Fully-async 两轮合计 4 条样本、236 个有效 token。首批 114 token 的来源、生成结束及消费序号均为 1;第二批 122 token 的来源及生成结束序号为 1,消费序号为 2,展示“生成期间无版本变化、生成后等待跨一次发布”。第二轮梯度范数为 23.3489;首轮两个 reward 相同,梯度为 0。
支持边界与材料
examples/agentic_weight_audit/README.md,GPU 配方位于scripts/training/text/run-agentic-weight-audit-smoke.sh。汇总使用现有 pickle dump,仅加载可信本地文件。