Skip to content

Select production epoch from pooled EMA validation curve - #36

Draft
MaxLinCode wants to merge 1 commit into
mainfrom
codex/ema-pooled-epoch
Draft

MaxLinCode wants to merge 1 commit into
mainfrom
codex/ema-pooled-epoch

Conversation

@MaxLinCode

Copy link
Copy Markdown
Owner

Summary

  • Track an EMA of the full model state during training and validate the averaged weights after each epoch.
  • Pool per-fold validation BCE curves epoch by epoch instead of taking a median of per-fold minima.
  • Smooth the pooled curve with a centered three-epoch moving average and pick the argmin epoch for the all-sources production run.
  • Record pooled, smoothed, and per-fold curves in fold/production checkpoints and metrics.json; persist EMA state in recovery checkpoints.
  • Expose ema_decay in the training recipe and CLI (default 0.999 with warm-up).

Per-fold checkpoints still select their own best EMA validation epoch for the single held-out-camera evaluation; only production epoch selection is pooled.

Test plan

  • PYTHONPATH=. .venv/bin/python -m pytest -q — 460 passed.
  • Added tests for EMA update/swap semantics, EMA-weight validation, recovery round-trip with EMA state, pooled/smoothed argmin selection, and clean-run production wiring.

Track an EMA of the full model state during fold training and validate the averaged weights each epoch. Pool the per-fold validation BCE curves, smooth the pooled curve with a centered three-epoch moving average, and train the all-sources production checkpoint for the argmin epoch instead of the median of per-fold minima.

Record the pooled, smoothed, and per-fold curves in the fold and production checkpoints and metrics, persist EMA state in recovery checkpoints, and cover EMA validation plus pooled selection with tests.
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