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

Use Random Generator in SMC instead of global seeding #5131

Merged
merged 3 commits into from
Nov 3, 2021

Conversation

ricardoV94
Copy link
Member

Closes #4938

Other changes:

  1. Use model.recompute_initial_point instead of deprecated model.initial_point.
  2. Update Metropolis Proposal classes to accept a Numpy Random Generator in __call__

@ricardoV94 ricardoV94 added maintenance SMC Sequential Monte Carlo labels Nov 3, 2021
@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #5131 (a80b650) into main (8a27ff4) will decrease coverage by 0.04%.
The diff coverage is 73.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5131      +/-   ##
==========================================
- Coverage   77.61%   77.57%   -0.05%     
==========================================
  Files          87       87              
  Lines       13981    13993      +12     
==========================================
+ Hits        10852    10855       +3     
- Misses       3129     3138       +9     
Impacted Files Coverage Δ
pymc/smc/sample_smc.py 83.33% <37.50%> (-2.18%) ⬇️
pymc/step_methods/metropolis.py 82.90% <71.87%> (-0.80%) ⬇️
pymc/smc/smc.py 98.35% <100.00%> (-0.02%) ⬇️
pymc/tests/helpers.py 65.21% <100.00%> (+3.31%) ⬆️
pymc/backends/ndarray.py 70.12% <0.00%> (-0.19%) ⬇️
pymc/model.py 83.75% <0.00%> (-0.05%) ⬇️
pymc/distributions/distribution.py 94.53% <0.00%> (-0.03%) ⬇️
pymc/step_methods/mlda.py 96.38% <0.00%> (-0.02%) ⬇️

Copy link
Member

@aloctavodia aloctavodia left a comment

Choose a reason for hiding this comment

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

LGTM!

@ricardoV94 ricardoV94 merged commit 8950f21 into pymc-devs:main Nov 3, 2021
@ricardoV94 ricardoV94 deleted the smc_rng branch November 3, 2021 13:26
ricardoV94 added a commit to ricardoV94/pymc that referenced this pull request Nov 4, 2021
Allow Metropolis proposals to depend on global seeding by default
twiecki pushed a commit that referenced this pull request Nov 5, 2021
Allow Metropolis proposals to depend on global seeding by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance SMC Sequential Monte Carlo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not use global random seeding in SMC sampling
3 participants