Skip to content

annbatch 0.3 samplers, no shim - #19

Merged
selmanozleyen merged 1 commit into
mainfrom
feat/annbatch-0.3
Oct 19, 2026
Merged

selmanozleyen merged 1 commit into
mainfrom
feat/annbatch-0.3

Conversation

@selmanozleyen

Copy link
Copy Markdown
Collaborator

Drops the annbatch shim (vendored fork samplers plus a monkeypatched Loader.__iter__) and the annbatch==0.2.1 pin.

  • annbatch>=0.3.1: it ships the #256 multi-dataset fix and a reworked ClassSampler (with RLEManager).
  • The primary samples with annbatch's ClassSampler.
  • Links use a new BoundClassSampler (scfit/data/_bound_sampler.py), a ClassSampler subclass. For each batch of the primary's schedule it draws one of its own classes matching on match_on, ∝ its weights within that context, and reads whole chunks of it through annbatch's RLEManager. An inner class with no positive-weight match is refused at construction.
  • The per-batch group comes from obs instead of the patched batch["label"]: each per-rep loader carries every row's leaf as an obs column, and a batch's leaf is its first row's. A link now reports its own leaf directly (it no longer carries the match_on prefix).

All existing data tests pass unchanged against annbatch 0.3.1, plus two for BoundClassSampler.

@selmanozleyen
selmanozleyen merged commit 677bae8 into main Oct 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant