Speaker
Description
The development of R packages for Bayesian analysis is often slowed by the computationally intensive nature of MCMC sampling, which turns iterative testing into a major bottleneck. A recurring challenge in this domain is the trade-off between saving large fitted model objects to disk versus regenerating them on each test run, a question coming up repeatedly during local development, continuous integration and collaborative workflows. This work introduces a framework to address this challenge by integrating robust testing strategies with CPU parallelization.
Our approach leverages the testthat framework, using setup.R to manage testing environments consistently across local R sessions, Posit Workbench and continuous integration (CI) pipelines. Model objects are generated only once per test run and shared across test files, balancing storage overhead against computational cost.
A key innovation is the parallelization of the sampling process itself within setup.R, with benchmarks demonstrating significant reductions in running time. By combining object caching with parallel execution, this framework transforms a traditionally slow workflow into an efficient, scalable process and offers a template for developers of computationally demanding R packages.
If you used AI tools or services to support the preparation of this submission, please state the name and reason for using each of them.
Claude Opus/Gemini: Reviewing the abstract
| Keywords: Please list up to 5 keywords to help us find the right session for your contribution. | R package development; Bayesian analysis; Parallelization; MCMC sampling; testthat |
|---|---|
| Virtual Option | This submission is for onsite presentation only |
| Video Recording | Video sharing is fine |
| The author(s) agree(s) to take responsibility and be accountable for the contents of the submission and is/are authorized to present it. | Confirm |
| Interested in serving as reviewer? | jean.muller@msd.com; shuai.wu@msd.com |