Repository navigation
Trainer: subsample train coverage metrics (train_metrics_every, default 10) - #9
Merged
Merged
Conversation
…s_every, default 10) Train loss still covers every batch. At 8361 tracks the per-step metric update costs ~9% of an A100 training step; every 10th batch cuts it to <1%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sampled batches can hold fewer than two valid genes, and gene R2 raises on fewer than two observations at epoch end. Gene metrics have no length axis, so they cost little; only coverage r/r2/spec are subsampled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Train coverage
r,r2andspecare now updated on everytrain.train_metrics_everyth batch of each dataset (default 10;1restores every batch). Train loss and gene metrics still cover every batch.Why. Train metrics are only logged, and early stopping uses them only when there is no validation data. At high track counts their per-step update is expensive. At 9-18 scale (8361 tracks × 24576 bins, batch 2), the update costs about 145 ms of a 1.61 s A100 step, roughly 9%. Spec is 55% of that and r + r2 the remaining 45%. Every 10th batch brings it under 1%, about 20 GPU-hours per 50-epoch fold. These figures were measured on a 4090 and scaled to the A100 by memory bandwidth. The in-step cost matched the standalone timing: +81 ms versus 79 ms.
Details
model_bestfrom sampled train metrics.Testing
test_train.pyandtest_spec_metrics.pypass, excepttest_train_gene.test_train_genefails its learning-floor check (valid r < 0.1) on unmodifiedmaintoo, and it also passed once on this branch, so it looks flaky.🤖 Generated with Claude Code