ligrec does seed + worker_id antipattern
Open
@selmanozleyen is already working on this.
Since Mar 2, 2026.
- Dominant language
- Python
- Stars
- 598
- Forks
- 121
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 3
Description
Report
Hi,
https://numpy.org/doc/stable/reference/random/parallel.html shows the antipattern here
# UNSAFE! Do not do this!
worker_seed = root_seed + worker_id
rng = np.random.RandomState(worker_seed)
But we do this in ligrec here: https://github.com/scverse/squidpy/blob/95d8b18a875fccb6cc9e9d90286b121d48f5cd2c/src/squidpy/gr/_ligrec.py#L821
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.