第五轮:锁/续跑/超时/自动分支/R4 探针与 encode-once/控制台加固;阶段内断点续跑(gen 按条、prep 按 shard、训练与 APG 定时原子存档+体面停止);分歧以实现方意见为准

This commit is contained in:
Hark
2026-10-18 06:40:25 +08:00
committed by cbb
parent 3675fbbd9b
commit f40a40c56b
36 changed files with 1199 additions and 285 deletions
+7 -2
View File
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
# 训练控制台一键启动(Linux / WSL / Git Bash):bash ml/console.sh → 打开 http://localhost:8100 ,在网页上点「开始训练」。
# 关闭本终端会结束控制台和正在跑的训练;要关终端继续跑,用 nohup bash ml/console.sh & 。
# Python 选择与 console.bat 一致:PYTHON → python → python3,判据是能 import torch(审查 N-10)。
# 训练进程独立会话运行:关掉终端只关控制台,训练继续;重新运行本脚本即可接着看、可停止。
cd "$(dirname "$0")/.."
PY=${PYTHON:-python}; command -v "$PY" >/dev/null 2>&1 || PY=python3
for c in "${PYTHON:-}" python python3; do
[ -n "$c" ] && command -v "$c" >/dev/null 2>&1 && "$c" -c "import torch" 2>/dev/null && { PY=$c; break; }
done
[ -n "${PY:-}" ] || { echo "找不到能 import torch 的 Python:先激活训练环境,或设 PYTHON=..."; exit 1; }
export PYTHON=$PY
exec "$PY" -m ml.monitor --open "$@"