fix(PipelineTask): Batch OCR 对 AND/OR 组合识别节点触发失效 - #1396
Open
ocsin1 wants to merge 1 commit into
Open
Conversation
Co-authored-by: he0119 <hmy0119@gmail.com>
Contributor
There was a problem hiding this comment.
Hey - 我在这里提供了一些高层次的反馈:
- 现在
owner_node_names用于触发,而node_names仍然与其并存,建议考虑要么重命名或在文档中说明这两组之间的区别,要么如果node_names已不再需要就将其移除,以避免给未来的维护者带来困惑。 - 在
prepare_batch_ocr中,你依赖ctx.plan.entries.size()的变化来推断 owner 节点;如果未来有改动对collect_ocr_from_reco进行修改,以删除条目或分多步添加条目,这种隐式耦合可能会失效——建议将这部分 ownership 跟踪逻辑封装到collect_ocr_from_reco内部,或通过返回值显式表明是否有条目被添加。
面向 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- Now that `owner_node_names` is used for triggering and `node_names` remains alongside it, consider either renaming or documenting the distinction between the two sets, or removing `node_names` if it is no longer needed, to avoid confusion for future maintainers.
- In `prepare_batch_ocr`, you rely on `ctx.plan.entries.size()` deltas to infer owner nodes; if a future change modifies `collect_ocr_from_reco` to remove entries or add them in multiple steps, this implicit coupling could break—consider encapsulating this ownership tracking inside `collect_ocr_from_reco` or returning explicit information about whether entries were added.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进评审质量。
Original comment in English
Hey - I've left some high level feedback:
- Now that
owner_node_namesis used for triggering andnode_namesremains alongside it, consider either renaming or documenting the distinction between the two sets, or removingnode_namesif it is no longer needed, to avoid confusion for future maintainers. - In
prepare_batch_ocr, you rely onctx.plan.entries.size()deltas to infer owner nodes; if a future change modifiescollect_ocr_from_recoto remove entries or add them in multiple steps, this implicit coupling could break—consider encapsulating this ownership tracking insidecollect_ocr_from_recoor returning explicit information about whether entries were added.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that `owner_node_names` is used for triggering and `node_names` remains alongside it, consider either renaming or documenting the distinction between the two sets, or removing `node_names` if it is no longer needed, to avoid confusion for future maintainers.
- In `prepare_batch_ocr`, you rely on `ctx.plan.entries.size()` deltas to infer owner nodes; if a future change modifies `collect_ocr_from_reco` to remove entries or add them in multiple steps, this implicit coupling could break—consider encapsulating this ownership tracking inside `collect_ocr_from_reco` or returning explicit information about whether entries were added.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
Author
node_names去重+依赖检查,和owner_node_names职责不相同
上下文一共就5行,一眼能看到吧,这样反而增加复杂度 |
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.
Summary by Sourcery
修复批量 OCR 流水线在处理组合 AND/OR 识别节点时的触发逻辑。
Bug 修复:
增强功能:
Original summary in English
Summary by Sourcery
Fix batch OCR pipeline trigger handling for combined AND/OR recognition nodes.
Bug Fixes:
Enhancements: