Files
PlantAI-rag-new/agent/legacy-rag/scripts/utils/generate_validation_report.py
jerryandClaude Fable 5 2f82c4a8dc P4/M5: agent/legacy-rag 源码迁移(449 模块 191K 行)+ 影子 7911/7912 冒烟
- 按生产 7900 容器黄金清单迁移(compile.manifest 449 条目,0 缺失)
- 入口双态:api.app(生产同源 3 路由)/ api.main(裁剪 11 路由族 91 路径)
- 修复:advanced/__init__ 空文件(包标记误覆盖,已从主项目恢复)
- 修复:api/rag_routes.py 跨环境 site-packages 注入改 LEGACY_GF_SITE_PACKAGES 门控
- 修复:scripts/utils 缺失(动态加载 reasoning_engine)
- 影子验证:kg/stats 数据连通(6.2s,与 7900 同源 normalized 后端)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-31 14:20:41 +08:00

59 lines
1.5 KiB
Python
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
"""生成验证报告"""
import json
from pathlib import Path
results_dir = Path("./evaluation/auto_results")
# 读取两篇文献的结果
papers = [
"短柄AP2s12864-016-2968-8_phylogeny_v2.json",
"番茄p450基因家族BMCgenomics2020_phylogeny_v2.json"
]
print("=" * 80)
print("基因家族系统发育提取验证报告")
print("=" * 80)
print()
for paper_file in papers:
path = results_dir / paper_file
if not path.exists():
print(f"❌ 未找到: {paper_file}")
continue
with open(path, 'r') as f:
data = json.load(f)
print(f"📄 {data.get('pdf_name', paper_file)}")
print("-" * 80)
print(f" 基因家族: {data.get('gene_family', 'N/A')}")
print(f" 物种: {data.get('species', 'N/A')}")
print(f" 总基因数: {data.get('total_genes', 0)}")
print(f" 总组数: {data.get('total_groups', 0)}")
print(f" 分类类型: {data.get('classification_type', 'N/A')}")
print(f" 置信度: {data.get('confidence', 'low')}")
print()
if data.get('groups'):
print(" 分组详情:")
for group_name, genes in sorted(data['groups'].items()):
print(f" • {group_name}: {len(genes)} 个基因")
else:
print(" ⚠️ 未提取到分组信息")
if data.get('notes'):
print()
print(" 备注:")
for note in data['notes']:
print(f" ℹ {note}")
print()
print()
print("=" * 80)
print("分析总结")
print("=" * 80)
print()