Comments (2)
I did some looking into where .bbi_args is passed through.
git grep -l .bbi_args | grep R/
NAMESPACE
NEWS.md
R/aaa.R
R/bbr.R
R/copy-model-from.R
R/model-summaries.R
R/model-summary.R
R/modify-model-field.R
R/new-model.R
R/nm-join.R
R/submit-model.R
R/submit-models.R
R/test-threads.R
R/utils.R
git grep -c "(.bbi_args)" | grep R/
R/bbr.R:3
R/model-summaries.R:2
R/model-summary.R:2
R/modify-model-field.R:1
R/new-model.R:1
R/nm-join.R:2
R/submit-model.R:1
R/test-threads.R:1
cat R/model-summaries.R | grep ".bbi_args" | grep R/
#' Additionally, **if you have renamed your `.ext` file, you will need to pass the new name through**, to `.bbi_args` or `.fail_flags` like so:
#' `model_summaries(..., .bbi_args = list(ext_file = "whatever_you_named_it"))`
#' @param .fail_flags Same as `.bbi_args` except these are used _only_ when a [model_summary()] call fails.
#' In that case, flags are appended to anything in `.bbi_args` and the summary is tried again.
.bbi_args = NULL,
model_summaries_serial <- function(.mods, .bbi_args, .fail_flags) {
model_summary(.m, .bbi_args = .bbi_args)
if (!is.null(.bbi_args)) {
.fail_flags <- combine_list_objects(.fail_flags, .bbi_args)
.retry <- bbr::model_summary(.m, .bbi_args = .fail_flags)
cmd <- bbi_exec(c("nonmem", "summary", check_bbi_args(args), paths),
model_summaries_concurrent <- function(.mods, .bbi_args, .fail_flags) {
summaries <- bbi_exec_model_summaries(.bbi_args, paths)
if (!is.null(.bbi_args)) {
args_retry <- combine_list_objects(args_retry, .bbi_args)
.bbi_args = NULL,
model_summaries_concurrent(.mods, .bbi_args, .fail_flags)
model_summaries_serial(.mods, .bbi_args, .fail_flags)
.bbi_args = NULL,
.bbi_args = .bbi_args,
cat R/model-summary.R | grep ".bbi_args"
#' or they are missing for some other legitimate reason, pass the appropriate flags through the `.bbi_args` argument.
#' For example, if have asked to skip the `$COV` step, you would call `model_summary(..., .bbi_args = list(no_cov_file = TRUE))`.
#' `ext_file = "NEWNAME"` to `.bbi_args`.
#' @param .bbi_args A named list specifying arguments to pass to bbi formatted like `list("nm_version" = "nm74gf_nmfe", "json" = T, "threads" = 4)`.
#' See [print_bbi_args()] for full list of options.
.bbi_args = NULL,
.bbi_args = NULL,
.bbi_args = .bbi_args,
#' @param .bbi_args A named list specifying arguments to pass to bbi formatted like `list("nm_version" = "nm74gf_nmfe", "json" = T, "threads" = 4)`. Run [print_bbi_args()] to see valid arguments.
.bbi_args = NULL,
if (is.null(.bbi_args)) {
.bbi_args <- list()
.bbi_args <- purrr::list_modify(.bbi_args, json = TRUE)
args_vec <- check_bbi_args(.bbi_args)
cat R/new-model.R | grep ".bbi_args"
#' @param .bbi_args A named list specifying arguments to pass to bbi
#' 4)`. Run [print_bbi_args()] to see valid arguments. These will be written
.bbi_args = NULL,
if (!is.null(.bbi_args)) .mod <- replace_all_bbi_args(.mod, .bbi_args)
cat R/submit-model.R | grep ".bbi_args"
#' @param .bbi_args A named list specifying arguments to pass to bbi
#' 4)`. Run [print_bbi_args()] to see valid arguments. Note that bbr does
.bbi_args = NULL,
.bbi_args = NULL,
.bbi_args = .bbi_args,
.bbi_args = NULL,
.bbi_args <- parse_args_list(.bbi_args, .mod[[YAML_BBI_ARGS]])
args_vec <- check_bbi_args(.bbi_args)
from bbr.
After discussion with @kyleam and @rymarinelli I think we can actually leave this for now. As discussed here we are catching this invalid value at submit time (i.e. when it would first be used) so this is really a question of whether it would be better UX for us to catch it earlier (i.e. when they attempt to set it).
There was also a related issue that we ill-defined here about how a user can unset a bbi arg. I had initially stumbled into this by trying to pass .bbi_args = list(threads = NULL)
to unset the threads
arg and that didn't work (though in retrospect, there's no obvious reason that it should have worked).
Where to go from here
So this issue now boils down to two potential features/improvements that we can consider whether we want to implement:
- Add a clearer interface and documentation for unsetting elements of
.mod$bbi_args
(e.g. possibly by passingNULL
to those elements in a function call).- To be clear, "unsetting" the arg means that it would not be present on the model object or in the associated YAML and therefore
bbi
would fall back to its default (thebbi.yaml
or the arg default withinbbi
) to determine the value.
- To be clear, "unsetting" the arg means that it would not be present on the model object or in the associated YAML and therefore
- Check for invalid
.bbi_args
at the time they are passed in (to the functions mentioned here) instead of waiting until we attempt to use them.
from bbr.
Related Issues (20)
- Bootstrap: function adjustments needed HOT 4
- Address deprecated warning in function `check_grd`
- Bootstrap runs should inherit attached bbi_args HOT 1
- inherit_param_estimates: revisit rounding and use matrix-handling PR HOT 1
- check_nonmem_finished and get_model_status refactor: improve wait times & change functionality HOT 9
- WK files created by bbr - delete by default? HOT 7
- Consider fail-safe for checking on terminated models HOT 4
- bbi package installation failed HOT 8
- Option to start bootstrap runs at final estimates from parent run HOT 3
- No error or warning when trying to overwrite run when `.wait = FALSE` HOT 15
- Re-name msf file in bootstrap run control stream HOT 1
- Submitting bootstrap run in batches can leave lots of unused compute HOT 2
- Bootstrap batch submission sometimes chokes when called before setup is done HOT 2
- Revisit `check_up_to_date` for `nmboot` models HOT 1
- push back minimum snapshot? HOT 5
- Feature: update $TABLE with a certain format HOT 1
- `bbi_init`: parse `nmfe_options` separately from other `.bbi_args`
- .exclude argument in run_log()
- Can't execute bbr commands via the clusters HOT 8
- Check if model can be passed to `nm_join()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbr.