metrumresearchgroup / bbr

R interface for model and project management
https://metrumresearchgroup.github.io/bbr/
Other
22 stars 2 forks source link

run_log, config_log, summary_log: ignore nested models #643

Closed kyleam closed 5 months ago

kyleam commented 5 months ago

For NONMEM Bayes models (model_type=nmbayes), bbr.bayes creates a series of submodels (of model_type=nonmem) in the output directory of the main model. These models are an internal implementation detail and are not meant to be discovered run_log(), config_log(), or summary_log().

In general, there's not a clear case where we'd need or want to support finding models within the output directory of another model. Teach find_models (used underneath by the three *_log() functions) to ignored submodels.

Re: https://github.com/metrumresearchgroup/bbr.bayes/issues/40


kyleam commented 5 months ago

@seth127 Thanks for the review.

I've pushed a minor fixup (doc typo and cosmetic code tweak); will merge after Drone finishes.

diff ```diff diff --git a/R/run-log.R b/R/run-log.R index f8a85c69..8cb0e3ec 100644 --- a/R/run-log.R +++ b/R/run-log.R @@ -111,7 +111,7 @@ find_models <- function(.base_dir, .recurse , .include) { return(mod_list) } -#' Remove nested models from models paths +#' Remove nested models from model paths #' #' For example, given a set of paths #' @@ -150,9 +150,7 @@ prune_nested_models <- function(yamls) { } } - paths <- paths[!is_nested] - - return(paths) + return(paths[!is_nested]) } ```