epiverse-trace / epidemics

A library of published compartmental epidemic models, and classes to represent demographic structure, non-pharmaceutical interventions, and vaccination regimes, to compose epidemic scenarios.
https://epiverse-trace.github.io/epidemics/
Other
8 stars 2 forks source link

Experimental parallelisation of Ebola model #214

Closed pratikunterwegs closed 5 months ago

pratikunterwegs commented 5 months ago

This draft PR is an experiment in parallelising the Ebola model using the {furrr} package, and is mostly aimed at checking whether this offers any performance gains. Changes:

  1. Using furrr::future_map() instead of Map() in .model_ebola_internal();
  2. Using {furrr} functionality for parallelisation-safe RNG seeds instead of `withr::local_seed();
  3. Setting up a multi-core future resolution plan for continuous benchmarking for futurised version of Ebola model.
github-actions[bot] commented 5 months ago

This pull request:

(Note that results may be inacurrate if you branched from an outdated version of the target branch.)

github-actions[bot] commented 5 months ago

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 21ebc61b785ceb97c70e6e9ab3db1d0cd6fef08d is merged into main:

pratikunterwegs commented 5 months ago

Seeing some dubious results on the benchmarking here as the parallelisations appears to speed up the ebola model but the PR also shows performance losses for the ODE model which wasn't touched in this PR. Running the CB again and closing this PR as a useful trial if checks remain unreliable.

github-actions[bot] commented 5 months ago

This is how benchmark results would change (along with a 95% confidence interval in relative change) if a6e001e1866556521434ae4ca32ba757ee7da484 is merged into main:

pratikunterwegs commented 5 months ago

Closing this PR as results remain potentially unreliable, but it might be worth exploring parallelisation again in future.