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

Allow workers to parallelise non-package models #215

Merged
merged 5 commits into from
Jul 5, 2022
Merged

Conversation

richfitz
Copy link
Member

Fixes #211, requires mrc-ide/dust#368 - before merge update branch pins

See the test case and #211 for a motivating example - if a model is created with dust::dust() then workers will fail to work because the alloc method (indeed, all the dust methods) are not found. This is because the model is created in a little fake package known only to the parent session. With the dust PR (mrc-ide/dust#368) we can easily load this fake package after deserialisation in a child process, with this function being a no-op if it is not needed. This PR just calls dust::dust_repair_environment unconditionally after loading the serialised data.

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #215 (53ea96c) into master (1f2410d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #215   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          29       29           
  Lines        2797     2798    +1     
=======================================
+ Hits         2795     2796    +1     
  Misses          2        2           
Impacted Files Coverage Δ
R/pmcmc_chains.R 100.00% <100.00%> (ø)

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 1f2410d...53ea96c. Read the comment docs.

@richfitz richfitz marked this pull request as ready for review July 5, 2022 12:46
@richfitz richfitz requested a review from hillalex July 5, 2022 13:00
@hillalex hillalex merged commit 795ddd7 into master Jul 5, 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.

Problem with mcstate chain parallelisation
2 participants