// ─────────────────────────────────────────────────────────────────────────── // PLACEHOLDER / SCAFFOLDING — intentionally unstyled. // This is a raw verification table for the SAE data layer (window.AtlasData.SAE, // populated by sae-loader.js). It exists so we can confirm the metrics are wired // correctly before visual design. Claude Design: feel free to restyle or replace // this entirely. The interesting data for visualization is each layer's // `training_curve` (per-checkpoint EV / L0 / dead% arrays) — see SAE_CONTRACT.md. // ─────────────────────────────────────────────────────────────────────────── function SAEDebugPanel() { const [st, setSt] = React.useState(window.SAELoader ? window.SAELoader.state : { status: 'idle' }); const [, tick] = React.useReducer(x => x + 1, 0); React.useEffect(() => { if (!window.SAELoader) return; const unsub = window.SAELoader.subscribe(setSt); const onReady = () => tick(); window.addEventListener('sae-data-ready', onReady); return () => { unsub && unsub(); window.removeEventListener('sae-data-ready', onReady); }; }, []); const sae = (window.AtlasData && window.AtlasData.SAE) || null; const layers = sae ? sae.layers : []; const fmt = (v, d = 3) => (typeof v === 'number' ? v.toFixed(d) : '—'); const repoShort = r => (r ? r.split('/').pop().replace('gemma-4-e2b-', '') : '—'); return (
SAE training metrics
placeholder scaffolding · {st.status} {st.status === 'loading' ? ` · ${Math.round((st.progress || 0) * 100)}%` : ''} {sae ? ` · ${sae.meta.loaded}/${sae.meta.expected} layers` : ''}
raw data check — restyle me
{st.status === 'error' && (
SAE load failed: {st.error}
)} {layers.length > 0 ? ( {layers.map(L => ( ))}
layer source EV mean L0 dead % recon steps ckpts
L{L.layer} {repoShort(L.repo)}{L.note ? ' *' : ''} {fmt(L.ev)} {fmt(L.mean_l0, 1)} {fmt(L.dead_pct, 1)} {fmt(L.recon_loss, 5)} {L.n_steps ?? '—'} {(L.training_curve && L.training_curve.ev.length) || 0}
) : ( st.status !== 'error' &&
loading SAE metrics…
)} {layers.some(L => L.note) && (
* source switched for this layer — hover the row for why.
)}
); } window.SAEDebugPanel = SAEDebugPanel;