Skip to content

feat: io rng handling#147

Open
selmanozleyen wants to merge 15 commits intoscverse:mainfrom
selmanozleyen:feat/io-rng-handling
Open

feat: io rng handling#147
selmanozleyen wants to merge 15 commits intoscverse:mainfrom
selmanozleyen:feat/io-rng-handling

Conversation

@selmanozleyen
Copy link
Member

continuation of #135 kinda. This was we can reproduce results of the shuffler

@selmanozleyen selmanozleyen marked this pull request as ready for review February 12, 2026 13:26
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.50%. Comparing base (d47240f) to head (b79c952).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
- Coverage   93.71%   91.50%   -2.21%     
==========================================
  Files          11       11              
  Lines         811      812       +1     
==========================================
- Hits          760      743      -17     
- Misses         51       69      +18     
Files with missing lines Coverage Δ
src/annbatch/io.py 93.11% <100.00%> (+0.02%) ⬆️
src/annbatch/samplers/_chunk_sampler.py 93.18% <ø> (ø)

... and 3 files with indirect coverage changes

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

@ilan-gold ilan-gold added the skip-gpu-ci Whether gpu ci should be skipped label Feb 12, 2026
Copy link
Collaborator

@ilan-gold ilan-gold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog as well!

@selmanozleyen selmanozleyen self-assigned this Feb 17, 2026
self,
*,
adata_paths: Iterable[PathLike[str]] | Iterable[str],
rng: np.random.Generator,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved as well, what I meant by "same in the other place this occurs"

shuffle_chunk_size
How many contiguous rows to load into memory before shuffling at once.
`(shuffle_chunk_size // n_obs_per_dataset)` slices will be loaded of size `shuffle_chunk_size`.
rng
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, why are we mentioning torch here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had it in Loader thinking user might set torch seed and expect reprod. but I guess there is no need here in io.py

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oky done

@ilan-gold ilan-gold enabled auto-merge (squash) February 26, 2026 10:52
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.

2 participants