Files
2026-06-24 09:35:46 +08:00

36 lines
1.3 KiB
Bash
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.
#!/bin/bash
#
# 根据 comparison_report.json 自动生成 Markdown 评测报告
#
# 用法:
# bash eval_tools/model_comparison/gen_report.sh <comparison_report.json>
# bash eval_tools/model_comparison/gen_report.sh <comparison_report.json> [--output <输出路径>] [--title "标题"] [--background "背景说明"] [--date YYYY-MM-DD]
#
# 示例:
# bash eval_tools/model_comparison/gen_report.sh \
# evaluation_results/eval_results_.../comparison_common_matches_.../comparison_report.json
#
# bash eval_tools/model_comparison/gen_report.sh \
# evaluation_results/.../comparison_report.json \
# --output my_report.md \
# --title "ROI0 模型对比报告"
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
export PYTHONPATH="${PROJECT_ROOT}:${PYTHONPATH}"
if [ $# -eq 0 ]; then
echo "用法: bash $0 <comparison_report.json> [选项...]"
echo ""
echo "选项:"
echo " --output/-o <路径> 输出 Markdown 文件路径默认JSON 同目录下的 COMPARISON_REPORT.md"
echo " --title <标题> 自定义报告标题"
echo " --background <说明> 背景说明文字"
echo " --date <YYYY-MM-DD> 评测日期(默认:今天)"
exit 1
fi
python "${SCRIPT_DIR}/generate_comparison_report.py" "$@"