Agent: fix success count logic in extraction scripts to match actual log markers#722
Merged
Merged
Conversation
…log markers - analyze_extraction_log.sh: - Success count: change from '[CPU X] OK' to 'Graph extracted to' (actual marker in code) - Success model list: also extract from 'Graph extracted to' - Update comments to reflect actual log marker format - check_extraction_progress.sh: - Success count: change from 'Successfully extracted' to 'Graph extracted to' - Total attempts condition: sync to match new marker The main success log output is 'INFO - Graph extracted to: ...', not 'Successfully extracted' or '[CPU X] OK'. Old logic missed most success records. Example (batch7_safe_run_no_llm.log): - Old logic: 283 successes - New logic: 4,691 successes
|
Thanks for your contribution! |
Xreki
approved these changes
May 21, 2026
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 Category
Description
问题描述
analyze_extraction_log.sh和check_extraction_progress.sh两个辅助脚本的成功数统计逻辑与 Agent 代码实际打印的日志标记不一致,导致统计结果严重低估。check_extraction_progress.sh"Successfully extracted""Graph extracted to"analyze_extraction_log.sh"\[CPU X\] OK""Graph extracted to"Agent 代码在成功抽取后的实际日志输出是
"Graph extracted to: /path/to/sample"(见graph_net_agent.py),旧统计方式遗漏了绝大部分成功记录。影响:以
batch7_safe_run_no_llm.log为例,旧逻辑统计成功数仅 283 个,与实际日志中的 4,691 个"Graph extracted to"记录严重不符。修改内容
check_extraction_progress.shgrep -c "Successfully extracted"grep -c "Graph extracted to"check_extraction_progress.sh"Successfully extracted""Graph extracted to"analyze_extraction_log.shgrep "\[(CPU|GPU) [0-9]+\] OK"grep -ac "Graph extracted to"analyze_extraction_log.sh"OK"提取"Graph extracted to"提取同时更新了脚本头部注释,说明当前日志使用的实际标记格式。
验证结果
# batch7_safe_run_no_llm.log 旧逻辑: 成功 283 个,成功率 1.3% 新逻辑: 成功 4,691 个,成功率 21.6%与日志中
"Graph extracted to"的实际出现次数(4,691)完全一致。