Skip to content

Ensure random seeds are unique for multiprocessed sampling#807

Open
TomWagg wants to merge 3 commits into
COSMIC-PopSynth:developfrom
TomWagg:seeds
Open

Ensure random seeds are unique for multiprocessed sampling#807
TomWagg wants to merge 3 commits into
COSMIC-PopSynth:developfrom
TomWagg:seeds

Conversation

@TomWagg

@TomWagg TomWagg commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

The title tells you what's up mostly, I messed up the sampling in v3.7.6 because multiprocessing workers need to be initialised with their own random seeds. I offset each worker by the process ID now so all should be fine. I've also added a test to ensure this doesn't happen again :)

@TomWagg TomWagg requested a review from katiebreivik June 22, 2026 21:29
@TomWagg TomWagg self-assigned this Jun 22, 2026
@TomWagg TomWagg added the bug label Jun 22, 2026
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.47%. Comparing base (8772c07) to head (6bb1294).
⚠️ Report is 176 commits behind head on develop.

Files with missing lines Patch % Lines
src/cosmic/sample/sampler/independent.py 0.00% 4 Missing ⚠️
src/cosmic/_version.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #807       +/-   ##
============================================
- Coverage    86.91%   76.47%   -10.44%     
============================================
  Files           40       59       +19     
  Lines        25542    28046     +2504     
  Branches         0      919      +919     
============================================
- Hits         22198    21447      -751     
- Misses        3344     6295     +2951     
- Partials         0      304      +304     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant