From 953fb7a45627cfff2e7c35b64a3d08b6926ae83c Mon Sep 17 00:00:00 2001 From: iomgaa Date: Thu, 9 Jul 2026 13:40:31 -0400 Subject: [PATCH] =?UTF-8?q?feat(scripts):=20infer=5Fvideo=5Fmme.sh=20?= =?UTF-8?q?=E6=8E=A8=E7=90=86=E5=AE=9E=E9=AA=8C=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 零参数全量 900 题、N_SAMPLES smoke test、TASK_TYPES 筛选、版本覆盖。 Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/infer_video_mme.sh | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 scripts/infer_video_mme.sh diff --git a/scripts/infer_video_mme.sh b/scripts/infer_video_mme.sh new file mode 100755 index 0000000..025d5e5 --- /dev/null +++ b/scripts/infer_video_mme.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# Video-MME 推理实验(TRM5 基线) +# 职责:在 900 道 Video-MME 题上跑全量推理,生成基线记录。 +# 用法: +# bash scripts/infer_video_mme.sh # 全量 900 题 +# N_SAMPLES=10 bash scripts/infer_video_mme.sh # smoke test +# TASK_TYPES="Action Recognition,Counting Problem" bash scripts/infer_video_mme.sh # 只跑指定题型 +# SKILLS_VERSION=v2 PROMPTS_VERSION=v2 bash scripts/infer_video_mme.sh # 指定版本 +set -euo pipefail + +cd "$(dirname "$0")/.." + +CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0}" +export CUDA_VISIBLE_DEVICES + +# 加载环境变量(API key 等) +set -a +source .env +set +a + +PYTHON="$(conda run -n Video-Tree-TRM which python)" + +EXTRA_ARGS=() + +if [[ -n "${TASK_TYPES:-}" ]]; then + IFS=',' read -ra TYPES <<< "${TASK_TYPES}" + EXTRA_ARGS+=(--task-types "${TYPES[@]}") +fi + +"${PYTHON}" main.py \ + --workspace-dir workspaces/default \ + --store-dir store \ + --mode infer \ + --concurrency 24 \ + --max-steps 40 \ + --skill-mode auto \ + --n-samples "${N_SAMPLES:-0}" \ + --questions benchmarks/Video-MME \ + --skills-version "${SKILLS_VERSION:-v1}" \ + --prompts-version "${PROMPTS_VERSION:-v1}" \ + "${EXTRA_ARGS[@]}"