dataset: split `LeechDataset` into a frozen `TensorCorpus` and an augmenting dataset; block-only twins; batched cross-layer augmentation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 8/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
調査の方向性
Start with src/leech/dataset.py, where LeechDataset spans lines 510-1941, and the row/block twin pairs listed in the issue. Read tests/test_dataset_streaming.py::TestBlockFillParity and tests/test_backend_parity.py to see what is currently held equal. Done means TensorCorpus and LeechDataset are split with no external _private access, the parity tests become golden fixtures, and the existing training-equivalence tests pass unchanged.
索引モデルが issue の本文から書いたものです。
説明
Tier P3 · effort L · from the 2026-09-13 review (training F6, F7; models F9)
LeechDataset (src/leech/dataset.py:510-1941, 1,430 lines; __init__ 369
lines, 21 parameters, 22 fields) is a corpus loader (_ArrayStream,
_TensorFill, row and block fill, CSR expansion, the encoding-coverage
decision), a tensor store, and an augmenter. External code reaches into its
privates: resolve_val_dataloader_workers reads _signals_tensor
(dataset.py:2064), train_model reads train_dataset.chunks[0], benchmark
iterates dataset.chunks. model_type is only used to look up two
hand-maintained name sets. Four rules exist as row/block twins held bit-equal
by tests/test_dataset_streaming.py::TestBlockFillParity:
_prepare_signal/_prepare_signals_block (1415/1267),
_prepare_features/_prepare_features_block (1489/1314),
_encode_sequence/_encode_sequences_block (1665/1253),
_apply_augmentation/_apply_augmentation_batch (1539/1904). Enabling
--augment-shift-max-bases or --augment-time-mask-bases disables
__getitems__ entirely (dataset.py:1856-1857), the measured 9× cliff.
append_dwell_template_channels (dataset.py:186-229) is a Python double
loop with no test and no Rust counterpart.
Acceptance criteria
TensorCorpus(frozen: one contiguous tensor per field, a metadataChunkTable,effective_seq_encoding,is_contiguous), built byTensorCorpus.from_npz(...)/.from_chunks(...);LeechDataset(corpus, augment: AugmentConfig | None, *, needs_features, wide_features)only indexes and augments. No external module reads a_privateattribute of either (test with a grep-based assertion or__slots__).- The block form is the implementation; the row form is
block(x[None])[0];TestBlockFillParitybecomes golden-fixture tests (saved expected tensors), so the reference is data, not a second implementation._block_fill_supportedshrinks accordingly. - Cross-layer shift and time mask draw
(B,)parameters and apply with gather/mask tensors on the batched path;__getitems__is never disabled by an augmentation. append_dwell_template_channelsis vectorised and tested, andtests/test_backend_parity.pynotes it as Python-only (or it gains a Rust twin).- The fork-shares-contiguous-buffers invariant and the numpy-gather rule are preserved and asserted by the existing tests; peak RSS at load on the fixture is unchanged or lower (record it).
Non-goals
- Changing any tensor value:
test_train_epoch_matches_host_side_referenceand the streaming parity tests must pass unchanged.
- 主要言語
- 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
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TokenEconomizer#360 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
reasons-gate
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
benthomasson/reasons-service#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信