// AI-MONITOR · Training observability section (Phase 1 — obs-only substrate). // 数据来自 /api/training(DCGM L1 + node-exporter, 经 obs-prometheus 只读)→ live.training。 // 覆盖 Layer C(GPU 健康)/D(RoCE 互联)/E(静默 stall 检测)。loss·grad-norm·step· // ETA·MFU 需训练框架信号源(Phase 2),此处诚实标"未接入",不伪造。 // 注:本文件独立 babel 作用域——全局词法环境已占用 live/_live/_NODES,故用 _tLive 等独立名; // SmallStat/DetailMetric 未导出到 window,故内联 _TStat。可用 window 全局:Ring/Sparkline/useLive/useLang。 const _tLive = window.AIData.live; function _fmtBw(mbps) { if (mbps >= 1000) return (mbps / 1000).toFixed(1) + " GB/s"; return Math.round(mbps) + " MB/s"; } function _fmtEta(sec) { if (sec == null) return "—"; const h = Math.floor(sec / 3600), m = Math.round((sec % 3600) / 60); return h > 0 ? `${h}h ${m}m` : `${m}m`; } // 训练框架信号(Phase 2):loss·grad-norm·step/ETA·acceptance。来自 leader tfevents, // 缺失时(当前轮 / 文件不存在)整块不渲染,由 TrainingSection 退回 "awaiting" 提示。 function _SignalBlock({ sig }) { const { t } = useLang(); const loss = sig.lossSeries || []; const acc = sig.accSeries || []; const macc = sig.meanAcceptSeries || []; const lossDelta = loss.length >= 2 ? loss[loss.length - 1] - loss[0] : 0; // mean accept length 是 EAGLE/投机解码核心 KPI:≥2.3 达标(对应单流 ≥50 t/s),1.0=无效 const ma = sig.meanAccept; const maTone = ma == null ? "var(--ink-3)" : ma >= 2.3 ? "var(--ok)" : ma >= 1.6 ? "var(--warn)" : "var(--bad)"; const stale = sig.staleSec != null && sig.staleSec > 600; // >10min 无写入 = 疑似停 const pct = Math.round((sig.progress || 0) * 100); return (
{t("Substrate health for the 4×GB10 training cluster — per-rank GPU, unified-memory headroom, CX-7 RoCE collective bandwidth, and a silent-stall heuristic. Read-only from obs; zero training impact.")}