Skip to content

refactor(samplers): make WeightedClassSampler a sibling of ClassSampler - #302

Open
selmanozleyen wants to merge 1 commit into
scverse:mainfrom
selmanozleyen:refactor/weighted-sibling
Open

selmanozleyen wants to merge 1 commit into
scverse:mainfrom
selmanozleyen:refactor/weighted-sibling

Conversation

@selmanozleyen

@selmanozleyen selmanozleyen commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Fixes: #301

disclaimer: opus 5.5 was used in writing this code

…ase instead of a subclass, since its batches mix classes and so break ClassSampler's one-class-per-batch contract. Seeded output of both samplers is unchanged.
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.72%. Comparing base (c8091f0) to head (308048c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #302      +/-   ##
==========================================
+ Coverage   91.70%   91.72%   +0.02%     
==========================================
  Files          18       18              
  Lines        1519     1523       +4     
==========================================
+ Hits         1393     1397       +4     
  Misses        126      126              
Files with missing lines Coverage Δ
...nnbatch/samplers/_class_samplers/_class_sampler.py 100.00% <100.00%> (ø)
...amplers/_class_samplers/_weighted_class_sampler.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@selmanozleyen selmanozleyen added the skip-gpu-ci Whether gpu ci should be skipped label Nov 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-gpu-ci Whether gpu ci should be skipped

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WeightedClassSampler shouldn't directly inherit ClassSampler

1 participant