chunking: edge guard hardcodes 5 bases instead of using kmer_context
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
Direzione di ricerca
Start in src/leech/chunking/extractor.py around lines 350 and 360, where the edge guard uses a hardcoded 5, then check src/leech/preparation/parallel.py lines 142-144 and the feature_start fallbacks at lines 275-276. Replace the constants with the configured ChunkConfig.kmer_context, threading it into _find_motif_positions, and change the or -5 fallback to an explicit None check. Done when kmer_context=10 and kmer_context=2 both produce the expected edge guard and feature_start=0 is preserved.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found during the generalization audit (#125). Not tRNA-specific, but the same class of baked-in default.
Problem
The chunk edge guard hardcodes 5 bases rather than using the configured kmer_context:
src/leech/chunking/extractor.py:350—base_idx = int(np.clip(base_idx, 5, leech_read.num_bases - 6))src/leech/chunking/extractor.py:360—focus_bases = list(range(5, leech_read.num_bases - 5))src/leech/preparation/parallel.py:142-144—return list(range(5, max(5, num_bases - 5)))
5 is DEFAULT_KMER_CONTEXT, but ChunkConfig.kmer_context is configurable. A run with kmer_context=10 still guards only 5 bases, so edge chunks get N-padded k-mers; a run with kmer_context=2 needlessly discards usable focus bases.
Same pattern, lower stakes
src/leech/chunking/serialization.py:80-81—chunk.get("feature_start", -5)src/leech/preparation/parallel.py:275-276—config.chunk.feature_start or -5
The second one has an additional bug: or treats a legitimate feature_start=0 as falsy and silently substitutes -5. Should be an explicit is None check.
Suggested fix
Use chunk_config.kmer_context at all three guard sites (np.clip(base_idx, k, num_bases - k - 1), range(k, num_bases - k)), thread it into _find_motif_positions, and derive the feature_start/feature_end fallbacks from it as well.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rnabioco/leech
-
load_model_from_checkpoint drops num_out/signal_in_channels for models whose __init__ takes **kwargsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 Più di una settimana Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
-
model train-many: one launcher that owns an allocation and trains a queue of configs across its GPUsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rnabioco/leech
Issue simili
-
ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
future-agi/future-agi#5070 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
juandresrodca/AdminForge#69 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
deepset-ai/haystack-integrations#817 ·
I maintainer di solito rispondono entro 12 giorni
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Forse già presa @gouyu-hou l’ha presa oggi. Apertatriage/confirmed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
agentscope-ai/agentscope#4397 ·
I maintainer di solito rispondono entro 2 giorni