Repository navigation
Conversation
Yunnglin
requested changes
Nov 23, 2026
Yunnglin
left a comment
Collaborator
There was a problem hiding this comment.
远程采样还在排队或执行时,旧 LoRA 快照确实需要保留。当前实现需要补齐快照的持有和回收链路后再合。
adapter_lease和on_adapter_task_unknown默认是None,这个 PR 里负责发布和回收权重的调用方还没有接入。请把保护接到实际回收路径,验证发布新权重时,排队或运行中的请求仍能读取旧快照,任务结束后可以回收。- 我用模拟
ReadTimeout验证了首包丢失的分支。保存请求能给回调传预先算好的任务 ID,采样请求传的是None。采样也需要有办法确认任务已经结束,再释放快照。请覆盖首个响应丢失、任务仍在执行、最终确认结束这几个状态。
建议把保存请求去重单独提出来,验证同一保存请求在首个响应丢失后重试只执行一次。当前 PR 还需要先同步 dev-swift-v5 并解决冲突。
1 of 8 tasks
Contributor
Author
|
@Yunnglin 已同步 dev-swift-v5 并解决冲突,Twinkle 修复已追加。Swift 的 RemoteWeightSync 也已接入快照持有和回收逻辑,配套提交 a58e9e565 已追加到 modelscope/ms-swift#10608。
Twinkle 侧独立单测 51 项通过,搭配本 PR 验证实际回收逻辑的 Swift 侧组件测试 39 项通过。保存请求去重已拆到独立分支,单独验证了首个响应丢失后重发同一请求,服务端只执行一次保存。 |
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.
PR type
PR information
远程异步 GRPO 发布新 LoRA 权重时,旧采样请求可能还在服务端排队或读取旧快照。权重管理方需要知道请求何时结束,才能安全回收旧文件。保存请求的 HTTP 响应丢失时,也需要能查到对应的服务端任务。
改动
HTTPSampler.sample()在调用期间持有本次使用的快照。只有无法确认远端任务是否结束时,才通知权重管理方暂缓回收。Paste your experiment result here(if needed).