fix(s16): 等待并行 Agent 结束后再关闭工作流日志 - #571
Open
Bryce-border wants to merge 1 commit into
Open
Bryce-border wants to merge 1 commit into
Bryce-border wants to merge 1 commit into
Conversation
Signed-off-by: Bryce <1557635468@qq.com>
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.
Fixes #570
问题与修改
一个并行分支失败时,默认的
asyncio.gather()会立即抛错,但其他分支仍在运行。工作流提前关闭 journal 并报告失败,导致晚返回的成功结果无法保存,resume 时可能重复调用模型。
本次让
parallel()等待已启动分支结束后再报告异常,pipeline()复用相同逻辑。成功结果能在关闭日志前保存,每个 pipeline item 仍独立经过各阶段。
修改沿用现有代码结构和测试体系,并同步更新中英日文档,修改的 Python 示例在三语中保持一致。
失败通知会比原先晚一些,需要等待其他分支结束;这是为了保留已经开始执行的模型工作的结果。
验证
git diff --check通过。验证使用受控 runner,没有调用真实模型。本次范围不包括外部取消、进程崩溃或强制终止线程内的模型请求。
说明:本次使用 Codex 协助分析和准备修改,回归测试已在本地运行。