proposal: dwell templates as a frozen model buffer computed in-graph (blocked on 2026-aa-trna-models#117)

Aperta
#371 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
8/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

This is a design proposal, not a ready task: it is explicitly blocked on rnabioco/2026-aa-trna-models#117 and says not to implement anything before that decision. Read the Sketch section and the referenced dwell-template code in leech.dataset and the feature_mean/feature_std affine layer before any discussion. Done would mean a maintainer decision on whether to proceed or deprecate --dwell-template-table.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Why

The 20 dwell-template ratio channels are the only model input computed by a Python-side dataset transform from an external table: leech.dataset.append_dwell_template_channels, keyed by a position frame the table has to declare (#364/#365), over a range it may not fully cover (#367), against a row it has to find by name (#366), from a file that has to travel with the checkpoint (#369) and that a non-Python consumer has to reimplement -- escapepod-rs has no implementation, so rnabioco/escapepod-models#145's own build script says "the ONNX alone is unrunnable".

Everything in that list disappears if the template is a model parameter: a frozen (n_aa, W) buffer on the feature branch that computes features[dwell_row] / template and concatenates, exactly like the feature_mean/feature_std affine layer --standardize-features already builds (#283). Then it exports into the ONNX graph, is frame-locked to the model's own feature window by construction, needs no TSV at predict time, and the contract's feature input is the corpus's 12 named rows that escapepod-rs already computes.

Sketch

  • models.components.DwellTemplateRatio(nn.Module): buffers template (n_aa, W) and dwell_row; forward concatenates the ratio rows (1.0 where template <= 0 or dwell <= 0, matching today's semantics).
  • Declared in the TOML feature branch as a node gated on when = "${dwell_template is not None}"; train_model loads the table via load_dwell_template_table, slices it to the corpus feature window, and passes it as the dwell_template param; config.json records the same provenance as #367 plus the buffer lives in state_dict.
  • LeechDataset stops appending; num_features in config.json stays the corpus row count and the contract stays honest.
  • Loading a pre-existing checkpoint that recorded dwell_template_table keeps the dataset-side path (no migration).

Blocked on

rnabioco/2026-aa-trna-models#117's base12 vs tmpl-fixed arms. If the mechanism does not clear that decision rule, close this and deprecate --dwell-template-table instead.

Non-goals (now)

Implementing anything before #117 reports.

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
11h 17m
PR unite (30g)
23

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rnabioco/leech

Tutte le issue di rnabioco/leech

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.