Skip to content

feat(train_board_ocr): replace --ckpt-dir with --model-name and add hand MAE - #9

Merged
tkgstrator merged 1 commit into
developfrom
feat/board-ocr-model-name-and-mae
Jul 13, 2026
Merged

feat(train_board_ocr): replace --ckpt-dir with --model-name and add hand MAE#9
tkgstrator merged 1 commit into
developfrom
feat/board-ocr-model-name-and-mae

Conversation

@tkgstrator

Copy link
Copy Markdown
Contributor

What

  • Replace --ckpt-dir with --model-name (+ --ckpt-root, default ./runs). Checkpoints now land at <ckpt-root>/<model-name>/. model_name defaults to board-ocr-<backbone>, matching the sweep naming.
  • --resume latest no longer errors when latest.pt is missing; it falls through to a fresh run so sweep scripts can pass it unconditionally.
  • Add hand/mae to metrics and surface board_acc, hand_acc, and hand_mae in train + val log lines. MAE treats the count head as ordinal, so "off by 1" reads very differently from "off by 9".
  • Update train.sh, train_multi_gpu.sh, train_backbones.sh to pass --model-name.

Why

  • The --ckpt-dir interface forced callers to reconstruct the same ./runs/board-ocr-<backbone> path everywhere. --model-name collapses that to a single identifier.
  • The old exact-match hand accuracy hid the difference between "1 off" and "9 off" — MAE makes ordinal quality visible in the training log.

Version

Bumped to v0.3.0 (CLI flag rename is breaking; pre-1.0 rule → minor).

Test plan

  • uv run python -m mito_train.training.train_board_ocr --help shows --model-name / --ckpt-root and no --ckpt-dir
  • Smoke run writes to ./runs/board-ocr-<backbone>/latest.pt
  • Log line shows board_acc, hand_acc, hand_mae
  • --resume latest on a fresh --model-name starts from epoch 1 instead of erroring

🤖 Generated with Claude Code

…and MAE

- Replace --ckpt-dir with --model-name (+ --ckpt-root, default ./runs).
  Checkpoints now land at <ckpt-root>/<model-name>/. model_name defaults
  to board-ocr-<backbone>, matching the sweep naming.
- --resume latest no longer errors when latest.pt is missing; it falls
  through to a fresh run so sweep scripts can pass it unconditionally.
- Add hand/mae to metrics and surface board_acc, hand_acc, and hand_mae
  in train + val log lines. MAE treats the count head as ordinal, so
  "off by 1" reads very differently from "off by 9".
- Update train.sh, train_multi_gpu.sh, train_backbones.sh to pass
  --model-name.
- Bump version to 0.3.0 (CLI flag rename is breaking; pre-1.0 => minor).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tkgstrator
tkgstrator merged commit 577a510 into develop Jul 13, 2026
3 checks passed
@tkgstrator
tkgstrator deleted the feat/board-ocr-model-name-and-mae branch July 13, 2026 03:41
@tkgstrator tkgstrator mentioned this pull request Jul 13, 2026
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