From 38b91b18d553888a1b27ab40dfe8d9b0d1608c03 Mon Sep 17 00:00:00 2001 From: Adrian Lison Date: Sat, 5 Oct 2024 10:57:12 +0200 Subject: [PATCH] Make run and test_run() more stable --- R/EpiSewer.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/EpiSewer.R b/R/EpiSewer.R index 43ee5c9..a767926 100644 --- a/R/EpiSewer.R +++ b/R/EpiSewer.R @@ -217,7 +217,7 @@ run.EpiSewerJob <- function(job) { ndraws = job$results_opts$samples_ndraws )) if (job$results_opts$fitted) { - fit_res$draws() + try(fit_res$draws(), silent = TRUE) try(fit_res$sampler_diagnostics(), silent = TRUE) try(fit_res$init(), silent = TRUE) try(fit_res$profiles(), silent = TRUE) @@ -250,6 +250,7 @@ test_run.EpiSewerJob <- function(job) { job$fit_opts$sampler$iter_sampling <- 5 job$fit_opts$sampler$show_messages <- FALSE job$fit_opts$sampler$show_exceptions <- FALSE + job$fit_opts$sampler$output_dir <- withr::local_tempdir() job$results_opts$samples_ndraws <- 2 return(run(job)) }