Skip to content

Feature: Categorical Sampler#136

Draft
selmanozleyen wants to merge 18 commits into
scverse:mainfrom
selmanozleyen:feat/categorical-sampler
Draft

Feature: Categorical Sampler#136
selmanozleyen wants to merge 18 commits into
scverse:mainfrom
selmanozleyen:feat/categorical-sampler

Conversation

@selmanozleyen
Copy link
Copy Markdown
Member

fixes: #119

selmanozleyen and others added 10 commits February 4, 2026 15:13
Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
…ch_size and drop_last (scverse#132)

* add failing tests

* update the tests

* fix

* Update src/annbatch/samplers/_chunk_sampler.py

Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>

* Update src/annbatch/samplers/_chunk_sampler.py

---------

Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 88.02817% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.80%. Comparing base (c9a5971) to head (6e20323).

Files with missing lines Patch % Lines
src/annbatch/samplers/_utils.py 60.00% 8 Missing ⚠️
src/annbatch/utils.py 64.70% 6 Missing ⚠️
src/annbatch/samplers/_categorical_sampler.py 97.82% 2 Missing ⚠️
src/annbatch/samplers/_chunk_sampler.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
- Coverage   90.80%   88.80%   -2.01%     
==========================================
  Files          10       12       +2     
  Lines         805      911     +106     
==========================================
+ Hits          731      809      +78     
- Misses         74      102      +28     
Files with missing lines Coverage Δ
src/annbatch/__init__.py 100.00% <100.00%> (ø)
src/annbatch/samplers/__init__.py 100.00% <100.00%> (ø)
src/annbatch/samplers/_chunk_sampler.py 93.40% <90.90%> (-0.08%) ⬇️
src/annbatch/samplers/_categorical_sampler.py 97.82% <97.82%> (ø)
src/annbatch/utils.py 70.19% <64.70%> (-15.40%) ⬇️
src/annbatch/samplers/_utils.py 60.00% <60.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

selmanozleyen and others added 8 commits February 5, 2026 15:32
commit 845053e
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 10:32:33 2026 +0100

    blunder fix forgot to add worker_id property

commit 1e71f0d
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 10:27:40 2026 +0100

    fix

commit 585898d
Merge: 4df0a95 c9a5971
Author: Selman Özleyen <32667648+selmanozleyen@users.noreply.github.com>
Date:   Fri Feb 6 10:10:45 2026 +0100

    Merge branch 'main' into fix/rng-handling

commit 4df0a95
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 10:04:07 2026 +0100

    accurate docstrings

commit e3e5739
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 10:01:24 2026 +0100

    remove redundant comments

commit ffb8041
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 09:59:57 2026 +0100

    remove comment

commit 2f24aee
Merge: a23f01e 8cc3df0
Author: Selman Özleyen <32667648+selmanozleyen@users.noreply.github.com>
Date:   Fri Feb 6 09:58:33 2026 +0100

    Merge branch 'main' into fix/rng-handling

commit a23f01e
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 09:57:29 2026 +0100

    update _spawn_worker_rng

commit dafba5f
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 09:34:56 2026 +0100

    dedup and update

commit 25d5908
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Fri Feb 6 09:31:26 2026 +0100

    remove get_part_for_worker

commit 6283625
Author: Selman Özleyen <32667648+selmanozleyen@users.noreply.github.com>
Date:   Fri Feb 6 09:23:14 2026 +0100

    Update tests/test_sampler.py

    Co-authored-by: Philipp A. <flying-sheep@web.de>

commit bbc5951
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Thu Feb 5 14:48:45 2026 +0100

    workerhandle takes rng

commit 31f4671
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Thu Feb 5 13:55:29 2026 +0100

    update mockworker so it passes all the tests expcept repr

commit 1bcbb88
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Thu Feb 5 13:54:54 2026 +0100

    add  unit test which fails in main but passes here

commit f893c2b
Author: selmanozleyen <syozleyen@gmail.com>
Date:   Thu Feb 5 13:44:24 2026 +0100

    fix for rng handling
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.

CategoricalSampler support

1 participant