From c2864bba48a6f94ab1171d9df47b1335f8306355 Mon Sep 17 00:00:00 2001 From: fatalis Date: Mon, 20 Jul 2026 12:33:03 -0500 Subject: [PATCH] Enable val/loss by default on the loss graph (#966) --- ui/src/components/JobLossGraph.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/components/JobLossGraph.tsx b/ui/src/components/JobLossGraph.tsx index 7d5ec10f..766dc1ab 100644 --- a/ui/src/components/JobLossGraph.tsx +++ b/ui/src/components/JobLossGraph.tsx @@ -212,8 +212,9 @@ export default function JobLossGraph({ job }: Props) { } }, [hydrated, useLogScale, showTrend, smoothing, plotStride, clipOutliers, enabled]); - // keep enabled map in sync with discovered keys. Only "loss/loss" is on by - // default; every other metric starts deactivated (user can toggle it on). + // keep enabled map in sync with discovered keys. "loss/loss" and "val/loss" + // are on by default; every other metric starts deactivated (user can toggle + // it on). useEffect(() => { // Nothing discovered yet — don't prune, or we'd wipe a restored selection // before the keys have loaded. @@ -221,7 +222,7 @@ export default function JobLossGraph({ job }: Props) { setEnabled(prev => { const next = { ...prev }; for (const k of lossKeys) { - if (next[k] === undefined) next[k] = persistedEnabledRef.current?.[k] ?? k === 'loss/loss'; + if (next[k] === undefined) next[k] = persistedEnabledRef.current?.[k] ?? (k === 'loss/loss' || k === 'val/loss'); } for (const k of Object.keys(next)) { if (!lossKeys.includes(k)) delete next[k];