fix(examples): convergence diagnostic needs >=2 epochs — skip on single-epoch probes#319
Merged
Conversation
…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).
38433c6 to
f2ee1c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HAR SYM trainer's convergence diagnostic compares per-EPOCH mean losses (first vs last). With
EPOCHS=1— exactly what thec-stack-watermarkCI 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 < 2now printsCONVERGENCE SKIP: single-epoch run — first/last epoch means are identical by constructioninstead of entering the comparison. OK/WARN behavior for real multi-epoch runs is unchanged.Smoke-verified:
EPOCHS=1 SYM_BITS=8run prints the SKIP line (andtrain_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