Enable val/loss by default on the loss graph (#966)
This commit is contained in:
1 parent
088084e2c2
commit
c2864bba48
1 file changed
+4
-3
@@ -212,8 +212,9 @@ export default function JobLossGraph({ job }: Props) {
|
|||||||
}
|
}
|
||||||
}, [hydrated, useLogScale, showTrend, smoothing, plotStride, clipOutliers, enabled]);
|
}, [hydrated, useLogScale, showTrend, smoothing, plotStride, clipOutliers, enabled]);
|
||||||
|
|
||||||
// keep enabled map in sync with discovered keys. Only "loss/loss" is on by
|
// keep enabled map in sync with discovered keys. "loss/loss" and "val/loss"
|
||||||
// default; every other metric starts deactivated (user can toggle it on).
|
// are on by default; every other metric starts deactivated (user can toggle
|
||||||
|
// it on).
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Nothing discovered yet — don't prune, or we'd wipe a restored selection
|
// Nothing discovered yet — don't prune, or we'd wipe a restored selection
|
||||||
// before the keys have loaded.
|
// before the keys have loaded.
|
||||||
@@ -221,7 +222,7 @@ export default function JobLossGraph({ job }: Props) {
|
|||||||
setEnabled(prev => {
|
setEnabled(prev => {
|
||||||
const next = { ...prev };
|
const next = { ...prev };
|
||||||
for (const k of lossKeys) {
|
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)) {
|
for (const k of Object.keys(next)) {
|
||||||
if (!lossKeys.includes(k)) delete next[k];
|
if (!lossKeys.includes(k)) delete next[k];
|
||||||
|
|||||||
Reference in new issue
Block a user