fix: --batch-bytes limits sequence data size, not inflated cost#26
Merged
Conversation
… estimate The batch partitioning had a 100MB fixed overhead in its cost model, so --batch-bytes 50m would put every genome in its own batch (since the overhead alone exceeded the limit). Now --batch-bytes simply controls the maximum basepairs of sequence data per batch, which works uniformly for both FastGA and wfmash. Removed unused cost model constants (FASTGA_OVERHEAD_BYTES, WFMASH_BYTES_PER_BP, etc.), BatchLimits struct, estimate_* functions, and the estimate_cost/resource_label/auto_limit trait methods.
git describe output changes without any file changing, so Cargo
doesn't re-run build.rs and the cache key goes stale. The new key
is {version}_f{fastga_rev}_w{wfmash_rev}, parsed from Cargo.lock.
This only changes when Cargo.lock changes, which is already a
rerun-if-changed trigger.
wfmash-rs build.rs checks for PORTABLE, not WFMASH_PORTABLE. The wrong name meant wfmash was always compiled with -march=native, causing SIGILL crashes when rust-cache restores binaries built on a runner with different CPU features. Also bumps cache prefix to invalidate stale non-portable binaries.
- Add samtools faidx calls to create .fai indexes for synthetic FASTA files (required since avg_seq_len_from_fai is called unconditionally) - Add --aligner fastga to all tests in fastga_integration.rs (they were using the default wfmash aligner despite being FastGA tests) - Use larger synthetic sequences in test_thread_parameter (64bp was too small even for wfmash's minimum 100bp segment length)
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.
Summary
--batch-bytes 50mnow means "50 MB of sequence data per batch" instead of being compared against a cost model with a 100 MB fixed overhead that made every genome exceed the limitFASTGA_OVERHEAD_BYTES,WFMASH_BYTES_PER_BP,BatchLimits,estimate_index_size,estimate_memory_usage,resolve_batch_bytes, andestimate_cost/resource_label/auto_limittrait methods (-224 lines)--aligner fastgaand--aligner wfmashTest plan
--batch-bytes 50mwith multi-genome FASTA groups genomes into batches (not one per batch)