feat(train_board_ocr): replace --ckpt-dir with --model-name and add hand MAE - #9
Merged
Merged
Conversation
…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>
Merged
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.
What
--ckpt-dirwith--model-name(+--ckpt-root, default./runs). Checkpoints now land at<ckpt-root>/<model-name>/.model_namedefaults toboard-ocr-<backbone>, matching the sweep naming.--resume latestno longer errors whenlatest.ptis missing; it falls through to a fresh run so sweep scripts can pass it unconditionally.hand/maeto metrics and surfaceboard_acc,hand_acc, andhand_maein train + val log lines. MAE treats the count head as ordinal, so "off by 1" reads very differently from "off by 9".train.sh,train_multi_gpu.sh,train_backbones.shto pass--model-name.Why
--ckpt-dirinterface forced callers to reconstruct the same./runs/board-ocr-<backbone>path everywhere.--model-namecollapses that to a single identifier.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 --helpshows--model-name/--ckpt-rootand no--ckpt-dir./runs/board-ocr-<backbone>/latest.ptboard_acc,hand_acc,hand_mae--resume lateston a fresh--model-namestarts from epoch 1 instead of erroring🤖 Generated with Claude Code