Skip to content

Commit

Permalink
backend-specific success criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Feb 12, 2024
1 parent 7953226 commit e286ffe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/estimate_infections.R
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ fit_model_with_nuts <- function(args, future = FALSE, max_execution_time = Inf,
)
}

if (inherits(fit, c("stanfit", "CmdStanMCMC"))) {
if ((inherits(fit, "stanfit") && fit@mode != 2L) ||
inherits(fit, "CmdStanMCMC")) {
return(fit)
} else {
return(NULL)
Expand Down

0 comments on commit e286ffe

Please sign in to comment.