From b38a98a51496d60e474fd78560eb150747bc3558 Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 16 Jan 2025 20:22:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=8D=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BB=93=E6=9E=9C=E5=88=B0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_lightrag_ollama_chat.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test_lightrag_ollama_chat.py b/test_lightrag_ollama_chat.py index 069859f0..5f8a03da 100644 --- a/test_lightrag_ollama_chat.py +++ b/test_lightrag_ollama_chat.py @@ -550,8 +550,8 @@ def parse_args() -> argparse.Namespace: parser.add_argument( "--output", type=str, - default="test_results.json", - help="测试结果输出文件路径" + default="", + help="测试结果输出文件路径,默认不输出到文件" ) parser.add_argument( "--tests", @@ -604,6 +604,8 @@ if __name__ == "__main__": except Exception as e: print(f"\n发生错误: {str(e)}") finally: - # 打印并导出测试统计 + # 打印测试统计 STATS.print_summary() - STATS.export_results(args.output) + # 如果指定了输出文件路径,则导出结果 + if args.output: + STATS.export_results(args.output)