Skip to content

真实零分与执行失败无法区分 - #3

Open
liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/detailed-failure-result
Open

liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/detailed-failure-result

Conversation

@liumaker

@liumaker liumaker commented Sep 8, 2026

Copy link
Copy Markdown

修改前无法区分真实零分和执行失败;修改后调用方直接读取 result.status,并可根据 result.failure 定位失败阶段。

@Soul-Code Soul-Code left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提交组织问题:当前 #2 → #3 → #4 → #5 → #6 → #8 → #7 是一条累计提交链,但全部以 main 为 base,导致后一个 PR 包含前面全部修改,标题与实际审核范围不一致。请调整为独立 PR 或正确的 stacked PR;每个问题都应增加能够证明“main 失败、当前独立修改后通过”的最小回归测试。

compute_detailed() 解决了“真实零分与执行失败无法区分”的问题,方向正确。但当前所有 preprocess() 异常都固定记录为 FailureReport(stage="tokenize")。我模拟 process_for_katex() 抛出着色异常后,得到的仍是 stage=tokenize,这会让新增的详细错误报告产生错误诊断。

请分别标识结构校验、tokenize 和 colorize 阶段,并增加对应测试。

Comment thread fastcdm/core.py
gt_latex, gt_color_map = preprocess(gt)
pred_latex, pred_color_map = preprocess(pred)
except Exception as exc:
return CDMResult(None, None, None, None, "preprocess_failed", FailureReport("tokenize", type(exc).__name__, str(exc), summary))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里把所有预处理异常都固定标成 tokenize。process_for_katex() 的着色异常也会被错误归类,导致详细结果无法定位真实阶段。请拆分结构校验、tokenize 与 colorize 的异常边界。

@liumaker
liumaker force-pushed the fix/detailed-failure-result branch from 71e7fe1 to 3cf4273 Compare September 10, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants