chunking: edge guard hardcodes 5 bases instead of using kmer_context
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 11時間 17分
- マージ済み PR(30日)
- 23
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rnabioco/leech のほかの issue
-
load_model_from_checkpoint drops num_out/signal_in_channels for models whose __init__ takes **kwargsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
model train-many: one launcher that owns an allocation and trains a queue of configs across its GPUsオープン
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
future-agi/future-agi#5070 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
juandresrodca/AdminForge#69 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
deepset-ai/haystack-integrations#817 ·
メンテナーはふだん 12 日以内に返信
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)対応中かも @gouyu-hou が今日担当しました。 オープンtriage/confirmed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
agentscope-ai/agentscope#4397 ·
メンテナーはふだん 2 日以内に返信