Skip to content

fix(examples): convergence diagnostic needs >=2 epochs — skip on single-epoch probes#319

Merged
LeoBuron merged 1 commit into
developfrom
convergence-skip
Jul 9, 2026
Merged

fix(examples): convergence diagnostic needs >=2 epochs — skip on single-epoch probes#319
LeoBuron merged 1 commit into
developfrom
convergence-skip

Conversation

@LeoBuron

@LeoBuron LeoBuron commented Jul 9, 2026

Copy link
Copy Markdown
Member

The HAR SYM trainer's convergence diagnostic compares per-EPOCH mean losses (first vs last). With EPOCHS=1 — exactly what the c-stack-watermark CI probe runs — the two values are the same number by construction, so the check warned on every probe run with a misleading "SYM@8 may be too coarse to descend at lr=0.0100".

The 50-epoch sweep data says the opposite: sym8 converges indistinguishably from float (train_loss 1.681→0.091 vs 1.684→0.086; test acc 0.905 vs 0.908 over 9 seeds), and even sym4 trains (0.886).

Fix: EPOCHS < 2 now prints CONVERGENCE SKIP: single-epoch run — first/last epoch means are identical by construction instead of entering the comparison. OK/WARN behavior for real multi-epoch runs is unchanged.

Smoke-verified: EPOCHS=1 SYM_BITS=8 run prints the SKIP line (and train_loss first=1.680596 — matching the sweep's epoch-1 sym8 loss, confirming the probe always trained normally within its single epoch).

🤖 Generated with Claude Code

…le-epoch probes

first/last train loss are per-EPOCH means; with EPOCHS=1 they are the
same number by construction, so the check always warned — bit the CI
c-stack-watermark probe, which runs EPOCHS=1 and printed a misleading
'SYM@8 too coarse to descend' on every run (the 50-epoch sweep shows
sym8 converging indistinguishably from float). Now prints CONVERGENCE
SKIP for single-epoch runs; smoke-verified (EPOCHS=1 -> SKIP line).
@LeoBuron LeoBuron force-pushed the convergence-skip branch from 38433c6 to f2ee1c9 Compare July 9, 2026 11:15
@LeoBuron LeoBuron merged commit f2ee1c9 into develop Jul 9, 2026
10 checks passed
@LeoBuron LeoBuron deleted the convergence-skip branch July 9, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant