feat: --retry-uncertain re-diagnoses uncertain rows; fix docstring

This commit is contained in:
2026-07-16 05:41:19 -04:00
parent c68de849da
commit b307f51340
5 changed files with 73 additions and 10 deletions
+10
View File
@@ -522,6 +522,7 @@ async def run_pipeline(
out_dir: Path,
generated_at: str,
force: bool = False,
retry_uncertain: bool = False,
) -> SplitBuildResult:
"""内联三阶段:Phase 0 INFRA T0 补录 → Phase 1 诊断 → Phase 2 冻结切分 → McNemar 护栏。
@@ -538,6 +539,7 @@ async def run_pipeline(
out_dir: 冻结产物目录(pools.json + split_manifest.json)。
generated_at: 生成时间戳(ISO 字符串,由调用方传入;见模块 C-2 复现锚点约定)。
force: 覆盖已存在冻结产物开关,透传给 build_split(False 时已存在即报错)。
retry_uncertain: 透传给 run_baseline_diagnosis,令已落 uncertain 题被重新诊断。
返回:
SplitBuildResult(冻结三池 + manifest + assignment)。
@@ -557,6 +559,7 @@ async def run_pipeline(
questions=questions,
store=signal_store,
deps=diagnosis_deps,
retry_uncertain=retry_uncertain,
)
# Phase 2: 冻结切分(读诊断信号 → 贪心选择 → 视频组原子切三池 → 冻结 + 六条断言)。
@@ -656,6 +659,7 @@ def _execute_real(config: VideoSplitConfig, fingerprint: str, args: argparse.Nam
out_dir=out_dir,
generated_at=generated_at,
force=args.force,
retry_uncertain=args.retry_uncertain,
)
)
finally:
@@ -784,6 +788,12 @@ def build_arg_parser() -> argparse.ArgumentParser:
action="store_true",
help="覆盖已存在的冻结 pools.json/manifest(旧产物备份为 .bak.*",
)
parser.add_argument(
"--retry-uncertain",
action="store_true",
dest="retry_uncertain",
help="把已落 tier='uncertain'(信号不可信降级)的题重新诊断,而非当作已完成跳过",
)
return parser