Skip to content

feat(training): freeze-then-score loop and replay - #41

Open
ng wants to merge 1 commit into
mainfrom
feat/training-loop
Open

ng wants to merge 1 commit into
mainfrom
feat/training-loop

Conversation

@ng

@ng ng commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • docs/plans/training-loop.md describes the weekly loop: ingest, train with a fixed protocol, freeze, score on nights the candidate never saw, then fold those nights in. A candidate is promoted only on ≥15 nights that are prospective for both models, with the 95% interval above 0, and then gets one locked-holdout read.

  • scripts/loop.py has three commands:

    • freeze registers a candidate (pod SHA-256, training cutoff, trainedAt).
    • score scores every registered model on development nights after its cutoff and flags which nights are prospective.
    • replay simulates the loop on past nights: nightly or weekly refits with retrain-models.py's nested selection, plus frozen models scored after their cutoffs.

    It runs locally only and drops locked nights first.

  • Replay on 31 nights (in the plan): every comparison ties.

    • Nightly vs weekly refit: +0.007 [−0.009, +0.025].
    • Retrained models vs frozen id 2 on 16 later nights: tie. Gains stopped at about 20 nights.
    • The weekly refit trained on the same nights as id 3 matched it exactly on 5 of 6 nights, which shows the replay reproduces the exported model.
  • The plan links knowledge/references/apple-watch-validation.md, which lands in docs(knowledge): record what the Apple Watch validation papers actually support #40.

Test plan

  • uv run --locked python -m unittest discover -s scripts -p 'test_*.py': 299 tests OK, including the new test_loop.py
  • Real data: loop.py replay on archive-20261122, and freeze + score for id 2, id 3 and cand-20261122
  • After 11-23: loop.py score on a fresh features file shows a first prospective night for cand-20261122

🤖 Generated with Claude Code

…and judges one it never saw

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc8dbf16-ec33-4f19-860d-72ae5a905c6d
Commits

Reviewing files that changed from the base of the PR and between 84ce788 and 6f46bd0.

Files selected for processing: 4

  • README.md
  • docs/plans/training-loop.md
  • scripts/loop.py
  • scripts/test_loop.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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