Commit Graph
18 Commits
Author SHA1 Message Date
Tom Kasper aa79bc02fb Train with gradient accumulation + Triton-native-JIT workaround on 16 GB GPUs
Effective batch stays the spec's 256; --grad-accum splits it into
micro-batches sized from measured bf16 fwd+bwd peaks on the RTX 4060 Ti
(GRAD_ACCUM table per ladder point, fallback 32). train/test shells also
export TORCH_DISABLE_NATIVE_JIT=1 (torch 2.13 Triton native ops cannot
build in the conda env: no CUDA headers) and expandable_segments to
fight fragmentation. Requires custom_models grad_accum support.
2026-11-05 23:13:23 +01:00
Tom Kasper 523667afac Use the lr:hq aligner preset everywhere (R10.4.1 / V14 chemistry)
Single config knob align_preset (default lr:hq) now drives all three
aligner invocations: dorado's native --mm2-opts, the minimap2 .mmi index
build (index options are stored in the .mmi and would otherwise override
the mapping preset) and the rocm fallback chain. Replaces the map-ont
default that kept reappearing from the design doc's labelling section.
2026-10-16 20:11:00 +01:00
Tom Kasper b53ddf0962 Emit per-batch CRAM from dorado's native aligner; drop the merge step
--emit-cram (reference FASTA required) shrinks the per-chunk alignment
artifacts to roughly half of BAM, and the label job now consumes the
per-batch CRAMs directly, so the dataset-sized merged BAM intermediate
is gone entirely. pysam opens the CRAMs with reference_filename; the
rocm fallback keeps the fastq->minimap2->bam chain and the merged BAM.
2026-10-16 20:05:43 +01:00
Tom Kasper 2ce1435a96 Align with dorado's native --reference aligner instead of piping SAM to minimap2
htslib rejected minimap2's re-emitted dorado SAM records on the runner
('CIGAR and query sequence are of different length'), killing the
label_pod5_batch pipe. dorado aligns during basecalling (--reference
<mmi> + --mm2-opts '-x map-ont -N 10'), is documented to cost no
basecalling throughput, and its own writer preserves the per-record
BC/RG barcode tags that bam2annotation needs for source_run. The rocm
fallback keeps the fastq->minimap2 chain.
2026-10-16 20:03:34 +01:00
Tom Kasper 820863a9c7 Complete E1-v2 workflow: stage A ladder + control + gate, stage B variants + baseline
- Snakefile: modules -> plain include: (single namespace; fixed cross-module
  helper resolution), rule all with stage-A/stage-B target sets driven by
  flat --config stage_b_arch/budget/stride switches.
- config/main.yaml: v2 run matrix (ladder 12-grid, control 1M cnn s4), store
  excludes (DCS spike-in, in-corpus escherichia trap reads), barcoding kit
  (SQK-RBK114-96 classified during dorado basecalls), removes v1 quota.
- baseline_pipeline: CUDA branch streams per-chunk dorado emit-sam through
  minimap2 (-N 10, tags preserved) and samtools view into per-batch BAMs,
  merged with samtools cat; ROCm/slorado fallback kept.
- ml_pipeline: label parquets -> signal stores (main / windows-ablation w4 /
  trap store) -> 12 ladder trainings + shuffled control -> custom_models test
  with the trap store (TP2) -> custom_models gate over the g11 runs; stage B
  adds windows ablation, holdout/core_clade(/bacillus_group) variants and the
  dorado-fast alignment baseline on the winner's identical test split.
- scripts: bam2annotation now emits source_run (barcoded -> barcodeNN from the
  dorado tags, dataset fallback); new label_qc.py (TP1 capture counts) and
  baseline_eval.py.
- custom_models submodule: bump to test_split.parquet export commit.
- README: two-stage run instructions (dev dry-run vs runner GPU).
2026-10-15 19:54:51 +01:00
Tom Kasper 5e95ea9476 Changed trap download structure 2026-10-06 19:14:53 +01:00
Tom Kasper 673005ceba added rocm path 2026-10-04 10:37:29 +01:00
Tom Kasper 58974c6af1 Removed trap dataset read limit 2026-10-04 09:58:00 +01:00
Tom Kasper 10b0a29d2b Corrected trap dataset handling 2026-10-04 09:55:42 +01:00
Tom Kasper f688e173e7 Ensured trap donwload runs solo 2026-10-03 15:52:31 +01:00
Tom Kasper 097ecab270 updated curl sybtax for trap data 2026-10-03 15:51:47 +01:00
Tom Kasper 0fdb5fa07b added limit for number of trap reads to process 2026-10-03 15:35:38 +01:00
Tom Kasper 88406e584e Updated config and resource requirements 2026-10-03 15:25:09 +01:00
Tom Kasper f0cd594148 Added custom models as submodule, added pipleline for trap species handling (up to alignment). Initial progress on custom model rules 2026-10-03 15:16:36 +01:00
Tom Kasper 3b93ceaf6e Fixed compression to happen at concatenation to save cpu time -> per-pod5-files are deleted anyways, so storage is not a concern. 2026-09-19 09:19:23 +01:00
Tom Kasper 15c56b9ffb fixed compression of basecalled data, added reference alignment step 2026-09-19 08:49:46 +01:00
Tom Kasper 1511281885 typo fix for all rule, fixed f-string handling in dorado model folder helper 2026-09-17 22:26:44 +01:00
Tom Kasper 08467102c8 intial version 2026-09-17 22:16:42 +01:00