Files
Video-Tree-TRM5/scripts/repair_trees.sh
T
iomgaa 45403b23b4 feat(repair): regenerator + supplement 防御修复 + 迁移脚本
- 新增 app/tree/repair/regenerator.py(VLM 重生成 + 级联修复)
- supplement.py: deduplicate_field str() 防御 + inject_value strip
- patch.py: ruff format 格式化
- repair_trees.sh: conda source 激活修复
- 新增 migrate_from_trm4.sh 迁移工具
- enhance/__init__.py → repair/__init__.py 重命名

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-07-09 07:53:59 -04:00

30 lines
1001 B
Bash
Executable File
Raw 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.
#!/usr/bin/env bash
# 树修复管线:检测 + VLM 重生成 + 校验 + Q&A 补全
#
# 用法:
# bash scripts/repair_trees.sh # 默认 16 并发续跑
# bash scripts/repair_trees.sh --dry-run # 仅检测不修复
# bash scripts/repair_trees.sh --reaggregate-all # 强制全量重聚合
# CONCURRENCY=8 bash scripts/repair_trees.sh # 自定义并发数
#
# 日志输出:
# stderr → 终端实时显示
# logs/repair_trees.log → 完整日志(自动 rotation 50MB
# logs/repair_telemetry.db → LLM/VLM 调用遥测
# logs/repair_progress.json → 断点续跑进度
set -euo pipefail
CONCURRENCY="${CONCURRENCY:-16}"
# shellcheck source=/dev/null
source "$(conda info --base)/etc/profile.d/conda.sh"
conda activate Video-Tree-TRM
python tools/repair_trees.py \
--videos-dir store/videos \
--srt-dir data/Video-MME/subtitle \
--questions-dir store/questions/benchmarks/Video-MME \
--concurrency "$CONCURRENCY" \
"$@"