Skip to content

Ensure random seeds are unique for multiprocessed sampling#807

Merged
katiebreivik merged 3 commits into
COSMIC-PopSynth:developfrom
TomWagg:seeds
Jul 8, 2026
Merged

Ensure random seeds are unique for multiprocessed sampling#807
katiebreivik merged 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.

@katiebreivik katiebreivik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@katiebreivik
katiebreivik merged commit 3dc0143 into COSMIC-PopSynth:develop Jul 8, 2026
4 of 6 checks passed
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.

2 participants