fix: use conda run --no-capture-output for unbuffered real-time logs

This commit is contained in:
2026-07-15 14:02:13 -04:00
parent 94728c5220
commit 266a1ab4bc
+4 -2
View File
@@ -40,7 +40,8 @@ set -euo pipefail
cd "$(dirname "$0")/.."
export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0}"
# 日志即时输出不缓存便于实时排错。
# 日志即时输出、绝不缓存便于实时排错 / tmux attach 看进度 / 管道 tee 落盘)
# 三重保险:PYTHONUNBUFFERED=1(环境级)+ python -u(命令级)+ loguru 走 stderr 同步写。
export PYTHONUNBUFFERED=1
# MODE=mock → --dry-run smoke:仅校验两阶段装配 + 打印指纹,不真调 LLM、不冻结产物。
@@ -54,6 +55,7 @@ fi
# 当前 threshold=32(连续 32 次失败触发熔断),不在本脚本设置。
CONCURRENCY="${CONCURRENCY:-12}"
conda run -n Video-Tree-TRM python -m app.harness.video_split_cli \
# conda run --no-capture-output:不需 conda init(非交互脚本可跑),且实时直出不缓冲。
conda run --no-capture-output -n Video-Tree-TRM python -u -m app.harness.video_split_cli \
--config config/video_split.yaml \
--concurrency "${CONCURRENCY}" ${DRY_RUN_FLAG}