From c191be16e226ea8f3cc8505aaef98a8b35e0a042 Mon Sep 17 00:00:00 2001 From: iomgaa Date: Thu, 9 Jul 2026 23:10:18 -0400 Subject: [PATCH] =?UTF-8?q?fix(question=5Fgen):=20L3=20frame=5Fpath=20?= =?UTF-8?q?=E6=8B=BC=E6=8E=A5=E8=A7=86=E9=A2=91=E7=9B=AE=E5=BD=95=E5=89=8D?= =?UTF-8?q?=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tree.json 中 frame_path 是相对路径(frames/xxx.jpg), generate_questions 需要拼上 store/videos/{video_id}/ 前缀供 VLM 读取。 Co-Authored-By: Claude Opus 4.6 (1M context) --- tools/generate_questions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/generate_questions.py b/tools/generate_questions.py index aee5bff..74cd921 100644 --- a/tools/generate_questions.py +++ b/tools/generate_questions.py @@ -918,6 +918,14 @@ async def _run_generate(args: argparse.Namespace) -> None: total_failed += 1 continue + # frame_path 是相对于视频目录的,拼为绝对路径供 VLM 读取 + video_dir = videos_dir / video_id + for l1 in tree.roots: + for l2 in l1.children: + for l3 in l2.children: + if l3.frame_path and not Path(l3.frame_path).is_absolute(): + l3.frame_path = str(video_dir / l3.frame_path) + used_node_ids: set[str] = set() session_id = f"gen-{task_type}-{seq}" generated = False