Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure ensemble sampling is reproducible #97

Merged
merged 6 commits into from
Feb 22, 2022
Merged

Conversation

devmotion
Copy link
Member

I noticed that in #95 I accidentally introduced a reproducibility issue for multithreaded sampling: If seeds are set for each chunk (as in the PR), then the samples will depend on the number of threads. This PR fixes the issue and reverts this change: For each chain, the RNG is set to a specific reproducible seed.

Additionally, I added the same seeds to the serial sampling (they are already used in the distributed sampling). This ensures that the samples do not depend on the chosen ensemble methods. It could be removed from the PR if not desired.

@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #97 (20ffc79) into master (24f88b1) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 20ffc79 differs from pull request most recent head 22299e2. Consider uploading reports for the commit 22299e2 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   97.73%   97.74%   +0.01%     
==========================================
  Files           7        7              
  Lines         221      222       +1     
==========================================
+ Hits          216      217       +1     
  Misses          5        5              
Impacted Files Coverage Δ
src/sample.jl 98.05% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6dae58b...22299e2. Read the comment docs.

Copy link
Member

@cpfiffer cpfiffer left a comment

Choose a reason for hiding this comment

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

Ah, good fix and good catch!

@cpfiffer
Copy link
Member

I rolled the version up because I submitted 3.3.1 too early, woops 😥

@cpfiffer cpfiffer merged commit d46ba93 into master Feb 22, 2022
@delete-merged-branch delete-merged-branch bot deleted the dw/reproducible branch February 22, 2022 19:06
@devmotion
Copy link
Member Author

Hmm are you sure? Wasn't 3.3.1 correct? With 3.3.2 automerge complains: JuliaRegistries/General#55232

@devmotion devmotion mentioned this pull request Feb 22, 2022
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.

2 participants