From f7174464d565ba7d54f9b18abf1b00d506dd958d Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Mon, 16 Mar 2026 11:45:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E8=84=9A=E6=9C=AC=20run=5Fall.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- vsp/qwen3.5-9b/run_all.py | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 vsp/qwen3.5-9b/run_all.py diff --git a/vsp/qwen3.5-9b/run_all.py b/vsp/qwen3.5-9b/run_all.py new file mode 100644 index 0000000..94451c1 --- /dev/null +++ b/vsp/qwen3.5-9b/run_all.py @@ -0,0 +1,49 @@ +"""一键运行所有测试""" +import subprocess +import sys +import os +import time + + +SCRIPTS = [ + ("环境检查", "vsp/qwen3.5-9b/setup_env.py"), + ("模型下载", "vsp/qwen3.5-9b/download_model.py"), + ("基础推理测试", "vsp/qwen3.5-9b/test_basic_inference.py"), + ("性能基准测试", "vsp/qwen3.5-9b/benchmark_speed.py"), + ("精度评估", "vsp/qwen3.5-9b/test_accuracy.py"), + ("并发压测", "vsp/qwen3.5-9b/test_concurrency.py"), + ("GPU需求分析", "vsp/qwen3.5-9b/gpu_requirements.py"), + ("生成报告", "vsp/qwen3.5-9b/generate_report.py"), +] + + +def main(): + os.chdir(os.path.dirname(os.path.abspath(__file__)) + "/../..") + print("=" * 60) + print("Qwen3.5-9B 全量测试") + print("=" * 60) + + for name, script in SCRIPTS: + print(f"\n{'='*60}") + print(f"[{name}] 运行 {script}") + print("=" * 60) + + t0 = time.time() + result = subprocess.run([sys.executable, script], capture_output=False) + elapsed = time.time() - t0 + + if result.returncode != 0: + print(f"\n[ERROR] {name} 失败 (退出码: {result.returncode})") + choice = input("继续运行后续测试?(y/n): ").strip().lower() + if choice != "y": + sys.exit(1) + else: + print(f"\n[OK] {name} 完成 ({elapsed:.1f}s)") + + print(f"\n{'='*60}") + print("所有测试完成!查看报告: vsp/qwen3.5-9b/results/REPORT.md") + print("=" * 60) + + +if __name__ == "__main__": + main()