diff --git a/R/nmm-config.R b/R/nmm-config.R index d947343..c9b8377 100644 --- a/R/nmm-config.R +++ b/R/nmm-config.R @@ -2,16 +2,14 @@ #' #' @param .mod a bbi nonmem model object #' @param model_number a string of model number e.g. 101a15. Default is pulled from .mod -#' @param files_to_track a vector of file extensions. Default is c("lst", "ext", "grd") -#' @param tmp_dir a temporary directory location to run nonmem. Default is /tmp +#' @param files_to_track a vector of file extensions. If left blank, nmm will use .ext, .lst. and .grd. +#' @param tmp_dir a temporary directory location to run nonmem. If left blank nmm will use /tmp #' @param watched_dir the directory where nonmem will output. Default is here::here()/model/nonmem #' @param output_dir the directory where watcher will place log and any output files default is here::here()/model/nonmem/in_progress -#' @param poll_duration the amount of time in seconds between the watchers polling -#' @param alert Where to send alerts if any. Default is None, available options are None or Slack -#' @param level What level to log at. Default is info. Available options are Trace, Debug, Info, Warn, Fatal -#' @param email if alert is set to Slack, this should be the email associated with slack to get messages sent directly to you. -#' @param threads number of threads if running a parallel job. Default is 1 -#' @param topic the ntfy.sh topic to send alerts to. +#' @param poll_duration the amount of time in seconds between the watchers polling. If left blank, nmm will use 1 second +#' @param level What level to log at. Available options are Trace, Debug, Info, Warn, Fatal if left blank, nmm will use Info +#' @param threads number of threads if running a parallel job. If left blank nmm will use 1 +#' @param alerter_opts a list for setting up an alerter fields needed are alerter, command, message_flag, use_stdout, args (list of additional args to be passed to alerter) #' #' @return none #' @keywords internal @@ -22,27 +20,22 @@ #' } generate_nmm_config <- function( .mod, - model_number = "", - files_to_track = c("lst", "ext", "grd"), - tmp_dir = "/tmp", + model_number = NULL, + files_to_track = NULL, + tmp_dir = NULL, watched_dir = file.path("model", "nonmem"), output_dir = file.path(watched_dir, "in_progress"), - poll_duration = 1, - alert = "None", - level = "Debug", - email = "", - threads = 1, - topic = "" + poll_duration = NULL, + level = NULL, + threads = NULL, + alerter_opts = list() ) { - if (model_number == "") { + if (is.null(model_number)) { model_number <- basename(.mod$absolute_model_path) } - alert <- paste0(toupper(substring(alert, 1, 1)), substring(alert, 2)) - level <- paste0(toupper(substring(level, 1, 1)), substring(level, 2)) - - if (alert == "Slack" && email == "") { - rlang::abort("If you want slack notifications you must also supply an email.") + if (!is.null(level)) { + level <- paste0(toupper(substring(level, 1, 1)), substring(level, 2)) } if (watched_dir == file.path("model", "nonmem")) { @@ -59,13 +52,25 @@ generate_nmm_config <- function( watched_dir = watched_dir, output_dir = output_dir, poll_duration = poll_duration, - alert = alert, level = level, - email = email, - threads = threads, - topic = topic + threads = threads ) + toml <- purrr::compact(toml) config_toml_path <- paste0(.mod$absolute_model_path, ".toml") - write_file(rextendr::to_toml(toml), config_toml_path) + alerter_opts <- purrr::compact(alerter_opts) + + if (length(alerter_opts) != 0) { + if ("args" %in% names(alerter_opts)) { + write_file(rextendr::to_toml( + toml, + alerter = alerter_opts[names(alerter_opts) != "args"], + alerter.args = alerter_opts$args), + config_toml_path) + } else { + write_file(rextendr::to_toml(toml, alerter = alerter_opts), config_toml_path) + } + } else { + write_file(rextendr::to_toml(toml), config_toml_path) + } } diff --git a/man/generate_nmm_config.Rd b/man/generate_nmm_config.Rd index 2c1676f..6d94633 100644 --- a/man/generate_nmm_config.Rd +++ b/man/generate_nmm_config.Rd @@ -6,17 +6,15 @@ \usage{ generate_nmm_config( .mod, - model_number = "", - files_to_track = c("lst", "ext", "grd"), - tmp_dir = "/tmp", + model_number = NULL, + files_to_track = NULL, + tmp_dir = NULL, watched_dir = file.path("model", "nonmem"), output_dir = file.path(watched_dir, "in_progress"), - poll_duration = 1, - alert = "None", - level = "Debug", - email = "", - threads = 1, - topic = "" + poll_duration = NULL, + level = NULL, + threads = NULL, + alerter_opts = list() ) } \arguments{ @@ -24,25 +22,21 @@ generate_nmm_config( \item{model_number}{a string of model number e.g. 101a15. Default is pulled from .mod} -\item{files_to_track}{a vector of file extensions. Default is c("lst", "ext", "grd")} +\item{files_to_track}{a vector of file extensions. If left blank, nmm will use .ext, .lst. and .grd.} -\item{tmp_dir}{a temporary directory location to run nonmem. Default is /tmp} +\item{tmp_dir}{a temporary directory location to run nonmem. If left blank nmm will use /tmp} \item{watched_dir}{the directory where nonmem will output. Default is here::here()/model/nonmem} \item{output_dir}{the directory where watcher will place log and any output files default is here::here()/model/nonmem/in_progress} -\item{poll_duration}{the amount of time in seconds between the watchers polling} +\item{poll_duration}{the amount of time in seconds between the watchers polling. If left blank, nmm will use 1 second} -\item{alert}{Where to send alerts if any. Default is None, available options are None or Slack} +\item{level}{What level to log at. Available options are Trace, Debug, Info, Warn, Fatal if left blank, nmm will use Info} -\item{level}{What level to log at. Default is info. Available options are Trace, Debug, Info, Warn, Fatal} +\item{threads}{number of threads if running a parallel job. If left blank nmm will use 1} -\item{email}{if alert is set to Slack, this should be the email associated with slack to get messages sent directly to you.} - -\item{threads}{number of threads if running a parallel job. Default is 1} - -\item{topic}{the ntfy.sh topic to send alerts to.} +\item{alerter_opts}{a list for setting up an alerter fields needed are alerter, command, message_flag, use_stdout, args (list of additional args to be passed to alerter)} } \value{ none diff --git a/vignettes/Running-nonmem.Rmd b/vignettes/Running-nonmem.Rmd index ebd66ba..a5b306e 100644 --- a/vignettes/Running-nonmem.Rmd +++ b/vignettes/Running-nonmem.Rmd @@ -242,21 +242,12 @@ curl -d "Finished model run: 1001-nonmem-run $JOBID" ntfy.sh/ntfy_demo To reiterate, this template file is run as a bash shell script so anything you can do in bash you can put into the template and pass the needed arguments and customize the behavior to your liking. ```{r, include = FALSE} -#cancelling any running nonmem jobs -# state <- slurmtools::get_slurm_jobs(user = "matthews") -# -# if (any(state$job_state %in% c("RUNNING", "CONFIGURING"))) { -# for (job_id in state %>% dplyr::filter(job_state == "RUNNING") %>% dplyr::pull("job_id")) { -# processx::run("scancel", args = paste0(job_id)) -# } -# } -# -# #removing generated files from running this vignette +#removing generated files from running this vignette # nonmem <- file.path("model", "nonmem") # -# unlink(file.path(nonmem, "1001"), recursive = TRUE) -# unlink(file.path(nonmem, "1001.yaml")) -# unlink(file.path(nonmem, "1001.toml")) -# unlink(file.path(nonmem, "submission-log"), recursive = TRUE) -# unlink(file.path(nonmem, "in_progress"), recursive = TRUE) +unlink(file.path(nonmem, "1001"), recursive = TRUE) +unlink(file.path(nonmem, "1001.yaml")) +unlink(file.path(nonmem, "1001.toml")) +unlink(file.path(nonmem, "submission-log"), recursive = TRUE) +unlink(file.path(nonmem, "in_progress"), recursive = TRUE) ``` diff --git a/vignettes/custom-alerts.Rmd b/vignettes/custom-alerts.Rmd index a48be3c..b44d55e 100644 --- a/vignettes/custom-alerts.Rmd +++ b/vignettes/custom-alerts.Rmd @@ -24,7 +24,7 @@ unlink(file.path(nonmem, "in_progress"), recursive = TRUE) ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, - comment = "#>" + comment = "" ) ``` @@ -43,9 +43,9 @@ Instead of using bbi we can use `nmm` ([NONMEM Monitor](https://github.com/A2-ai/nonmem-monitor)) which currently has some additional functionality of sending notifications about zero gradients, missing -1E9 lines in ext file, and some very basic control -stream errors. Currently, only slack or [ntfy.sh](ntfy.sh) is supported -for receiving notifications. To use `nmm` you can install the latest -release from the github repository linked above. +stream errors. Nonmem-monitor also allows for setting up an alerter to +be better fed these messages - more on that later. To use `nmm` you can +install the latest release from the github repository linked above. We can update the template file accordingly: @@ -70,7 +70,9 @@ it's not on our path. The `config.toml` file controls what `nmm` will monitor and where to look for files and how to alert you. We'll use `generate_nmm_config()` to create this file. First we can look at the documentation to see what -type of information we should pass to this function.![documentation for +type of information we should pass to this function. + +![documentation for generate_nmm_config()](data/images/generate_nmm_config_help.png) ```{r} @@ -87,22 +89,17 @@ if (file.exists(file.path(nonmem, paste0(mod_number, ".yaml")))) { slurmtools::generate_nmm_config(mod) ``` -This generates the following toml file. Notice that alert is set to -'None', and both email and topic are empty. Since we're in vignettes -we'll need to update the `watched_dir` and `output_dir`. +This generates the following toml file. By passing in just the mod +object, `nmm` will use the default values for the other options so if +you need to change which files are tracked, or how many threads to use +you'll have to explicitly pass that to `generate_nmm_config`. Since +we're in vignettes we'll need to update the `watched_dir` and +`output_dir` accordingly. ``` 1001.toml model_number = '1001' -files_to_track = [ 'lst', 'ext', 'grd' ] -tmp_dir = '/tmp' watched_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/model/nonmem' output_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/model/nonmem/in_progress' -poll_duration = 1 -alert = 'None' -level = 'Debug' -email = '' -threads = 1 -topic = '' ``` ```{r} @@ -116,20 +113,13 @@ This updates the `1001.toml` config file to: ``` 1001.toml model_number = '1001' -files_to_track = [ 'lst', 'ext', 'grd' ] -tmp_dir = '/tmp' watched_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem' output_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/in_progress' -poll_duration = 1 -alert = 'None' -level = 'Debug' -email = '' -threads = 1 -topic = '' ``` We can now run `submit_nonmem_model` and get essentially the same -behavior as running with `bbi`. On linux `~/.local/bin/` will be on your path so saving binaries there is a good approach. +behavior as running with `bbi`. On linux `~/.local/bin/` will be on your +path so saving the downloaded binaries there is a good approach. ```{r} submission_nmm <- slurmtools::submit_nonmem_model( @@ -144,7 +134,7 @@ submission_nmm ``` ```{r} -slurmtools::get_slurm_jobs() +slurmtools::get_slurm_jobs(user = "matthews") ``` The one difference between using `nmm` compared to `bbi` is that a new @@ -158,17 +148,14 @@ values off the diagonal so these are fixed at 0. Finally we see that GRD(6) hit 0 relatively early in the run. ``` vignettes/model/nonmem/in_progress/1001/modeling_run_20240827201226.log -20:12:36 [INFO] bbi log: time="2024-08-27T20:12:36Z" level=info msg="Successfully loaded default configuration from /cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/bbi.yaml" -20:12:36 [INFO] bbi log: time="2024-08-27T20:12:36Z" level=info msg="Beginning Local Path" -20:12:36 [INFO] bbi log: time="2024-08-27T20:12:36Z" level=info msg="A total of 1 models have completed the initial preparation phase" -20:12:36 [INFO] bbi log: time="2024-08-27T20:12:36Z" level=info msg="[1001] Beginning local work phase" -20:12:58 [INFO] OMEGA(2,1) has 0 value -20:12:58 [INFO] SIGMA(2,1) has 0 value -20:13:00 [INFO] SIGMA(2,1) has 0 value -20:13:00 [INFO] OMEGA(2,1) has 0 value -20:13:04 [INFO] SIGMA(2,1) has 0 value -20:13:04 [INFO] OMEGA(2,1) has 0 value -20:13:04 [WARN] "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/1001/1001.grd" has 0 gradient for parameter: GRD(6) +19:13:45 [INFO] bbi log: time="2024-09-20T19:13:45Z" level=info msg="Successfully loaded default configuration from /cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/bbi.yaml" +19:13:45 [INFO] bbi log: time="2024-09-20T19:13:45Z" level=info msg="Beginning Local Path" +19:13:45 [INFO] bbi log: time="2024-09-20T19:13:45Z" level=info msg="A total of 1 models have completed the initial preparation phase" +19:13:45 [INFO] bbi log: time="2024-09-20T19:13:45Z" level=info msg="[1001] Beginning local work phase" +19:14:16 [INFO] "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/1001/1001.ext": Iteration: 5, Parameter(s) that hit zero: ["SIGMA(2,1)", "OMEGA(2,1)"] +19:14:19 [INFO] "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/1001/1001.ext": Iteration: 10, Parameter(s) that hit zero: ["OMEGA(2,1)", "SIGMA(2,1)"] +19:14:21 [INFO] "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/1001/1001.ext": Iteration: 15, Parameter(s) that hit zero: ["SIGMA(2,1)", "OMEGA(2,1)"] +19:14:21 [WARN] "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/1001/1001.grd" Iteration: 10, has 0 gradient for parameter(s): ["GRD(6)"] ``` After a run has finished several messages are sent to the log after a @@ -176,9 +163,9 @@ final check of the files listed in the `files_to_track` field of the `1001.toml` file. ``` vignettes/model/nonmem/in_progress/1001/modeling_run_20240827201226.log -20:13:16 [INFO] Received Exit code: exit status: 0 -20:13:16 [WARN] 1001.ext: Missing ext final output lines. Observed lines were: [-1000000000.0, -1000000004.0, -1000000006.0, -1000000007.0] -20:13:16 [WARN] "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/1001/1001.grd": The following parameters hit zero gradient through the run: ["GRD(6)"] +19:14:31 [INFO] Received Exit code: exit status: 0 +19:14:31 [WARN] 1001.ext: Missing ext final output lines. Observed lines were: [-1000000000.0, -1000000004.0, -1000000006.0, -1000000007.0] +19:14:31 [WARN] "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/1001/1001.grd": The following parameters hit zero gradient through the run: ["GRD(6)"] ``` We see that GRD(6) hit zero during the run and that only a subset of the @@ -194,31 +181,40 @@ lines, and 0 parameter values can also be sent to ntfy by altering the dig through a noisy log file. Let's update our call to `generate_nmm_config` to have `nmm` send -notifications to the `NONMEMmonitor` topic on [ntfy.sh](ntfy.sh). +notifications to the `NONMEMmonitor` topic on [ntfy.sh](ntfy.sh). Just +like how `submit_nonmem_model` can feed additional information to the +template with `slurm_template_opts`, we can add an alerter feature to +nmm with `alerter_opts`. If we go to ntfy.sh we can see that to send a +message to ntfy we can run +`curl -d "Backup successful 😀" ntfy.sh/mytopic`. `nmm` can call a +binary with a command and pass a message to a flag. For ntfy, the binary +is `curl` the message flag is `d` and the command is `ntfy.sh/mytopic` +and there are no additional args. ```{r} slurmtools::generate_nmm_config( mod, - alert = "Ntfy", - topic = "NONMEMmonitor", watched_dir = "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem", - output_dir = "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/in_progress") + output_dir = "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/in_progress", + alerter_opts = list( + alerter = Sys.which('curl'), #binary location of curl, + command = "ntfy.sh/NONMEMmonitor", + message_flag = "d" + ) +) ``` This updates the `1001.toml` file to this: ``` 1001.toml model_number = '1001' -files_to_track = [ 'lst', 'ext', 'grd' ] -tmp_dir = '/tmp' watched_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem' output_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/in_progress' -poll_duration = 1 -alert = 'Ntfy' -level = 'Debug' -email = '' -threads = 1 -topic = 'NONMEMmonitor' + +[alerter] +alerter = '/usr/bin/curl' +command = 'ntfy.sh/NONMEMmonitor' +message_flag = 'd' ``` When we re-run the `submit_nonmem_model` call we will now get ntfy @@ -232,7 +228,7 @@ submission_nmm <- slurmtools::submit_nonmem_model( overwrite = TRUE, slurm_job_template_path = file.path(nonmem, "slurm-job-nmm.tmpl"), slurm_template_opts = list( - nmm_exe_path = normalizePath("~/.local/bin/nmm-x86_64-unknown-linux-gnu/nmm")) + nmm_exe_path = normalizePath("~/.local/bin/nmm")) ) submission_nmm @@ -259,9 +255,9 @@ This gives us the notifications in a much more digestible format # #removing generated files from running this vignette # nonmem <- file.path("model", "nonmem") # -# unlink(file.path(nonmem, "1001"), recursive = TRUE) -# unlink(file.path(nonmem, "1001.yaml")) -# unlink(file.path(nonmem, "1001.toml")) -# unlink(file.path(nonmem, "submission-log"), recursive = TRUE) -# unlink(file.path(nonmem, "in_progress"), recursive = TRUE) +unlink(file.path(nonmem, "1001"), recursive = TRUE) +unlink(file.path(nonmem, "1001.yaml")) +unlink(file.path(nonmem, "1001.toml")) +unlink(file.path(nonmem, "submission-log"), recursive = TRUE) +unlink(file.path(nonmem, "in_progress"), recursive = TRUE) ``` diff --git a/vignettes/data/images/generate_nmm_config_help.png b/vignettes/data/images/generate_nmm_config_help.png index 0c8ace9..3585156 100644 Binary files a/vignettes/data/images/generate_nmm_config_help.png and b/vignettes/data/images/generate_nmm_config_help.png differ diff --git a/vignettes/data/images/nmm_ntfy_alerts.png b/vignettes/data/images/nmm_ntfy_alerts.png index 12a4f5d..c22faa9 100644 Binary files a/vignettes/data/images/nmm_ntfy_alerts.png and b/vignettes/data/images/nmm_ntfy_alerts.png differ diff --git a/vignettes/data/images/nmm_slack_notifications.png b/vignettes/data/images/nmm_slack_notifications.png index 8fdb45b..26514f0 100644 Binary files a/vignettes/data/images/nmm_slack_notifications.png and b/vignettes/data/images/nmm_slack_notifications.png differ diff --git a/vignettes/slack-alerts.Rmd b/vignettes/slack-alerts.Rmd index 3b62f92..7dea508 100644 --- a/vignettes/slack-alerts.Rmd +++ b/vignettes/slack-alerts.Rmd @@ -24,7 +24,7 @@ unlink(file.path(nonmem, "in_progress"), recursive = TRUE) ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, - comment = "#>" + comment = "" ) ``` @@ -52,50 +52,76 @@ if (file.exists(file.path(nonmem, paste0(mod_number, ".yaml")))) { There is also functionality to pair `nmm` with [slack_notifier](https://github.com/A2-ai/slack_notifier/releases/) and get messages sent directly to you via a slack bot. This requires you to -download the slack_notifier binaries and added them to your path so -`nmm` can find it. You can download the latest release and extract the -binary and again save it to `~/.local/bin`. +download the slack_notifier binaries. You can download the latest +release and extract the binary and again save it to `~/.local/bin`. ```{r} -Sys.which("slack_notifier") +Sys.which("snt") ``` -slack_notifier requires an additional `slack_notifier/config.yaml` file -that contains the slack bot OAuth token which is found from +`snt` requires the slack bot OAuth token which is found from [[[https://api.slack.com/apps/\\\\](https://api.slack.com/apps/){.uri}](%5Bhttps://api.slack.com/apps/%5D(https://api.slack.com/apps/)%7B.uri%7D){.uri}\ /oauth?]. +APP ID\> /oauth?]. This can be saved in a file and fed into the `snt` +with the `tokenFile` flag. ``` slack_notifier/config.yaml -SLACK_OAUTH_TOKEN: "encrypted(Bot User OAuth Token)" +token: "encrypted(Bot User OAuth Token)" ``` Again, we need to update the `1001.toml` file to get slack -notifications. We need to set `alert = "slack"` and provide the `email` -associated with the slack account in `generate_nmm_config`. +notifications. If we look at the `snt` help message we see that it +should be called via +`snt slack -c config_file -k decryption_key -a token -f tokenFile -e email -m message -t timestamp` + +the config_file can contain the key, and token file so you don't need to +repeatedly use that information. I've saved the tokenFile location and +key in a config file in `~/.local/bin/slack_notifier_settings.yaml` and +will use the -c flag to point to that. + +With this our call to `snt` would look like: + +`snt slack -c ~/.local/bin/slack_notifier_settings.yaml -e matthews@a2-ai.com -m "Hello"` + +The timestamp flag is needed if we want to reply to a message, which to +save on spamming alerts we want to do. However, since we can't possible +know the timestamp of a message we have yet to send we don't have a way +of specifying this argument now. This is what the use_stdout argument +for `nmm` alerter is for. It will capture the standard out of the call +to the alerter binary and parse it for additional flags to use on +subsequent calls. With all this in mind, we can update our `nmm` config +to achieve this slack messaging. ```{r} slurmtools::generate_nmm_config( mod, - alert = "slack", - email = "matthews@a2-ai.com", watched_dir = "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem", - output_dir = "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/in_progress") + output_dir = "/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/in_progress", + alerter_opts = list( + alerter = Sys.which('snt'), #binary location of nmm, + command = "slack", + message_flag = "m", #This is the default so we don't need to specify it + use_stdout = TRUE, #captures output of snt -- which will include --timestamp aksfl;ajklajl; + args = list(email = "matthews@a2-ai.com", config = "/cluster-data/user-homes/matthews/.local/bin/slack_notifier_settings.yaml") + ) + ) ``` This generates the following toml file: ``` 1001.toml model_number = '1001' -files_to_track = [ 'lst', 'ext', 'grd' ] -tmp_dir = '/tmp' watched_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem' output_dir = '/cluster-data/user-homes/matthews/Packages/slurmtools/vignettes/model/nonmem/in_progress' -poll_duration = 1 -alert = 'Slack' -level = 'Debug' + +[alerter] +alerter = '/cluster-data/user-homes/matthews/.local/bin/snt' +command = 'slack' +message_flag = 'm' +use_stdout = true + +[alerter.args] email = 'matthews@a2-ai.com' -threads = 1 -topic = '' +config = '/cluster-data/user-homes/matthews/.local/bin/slack_notifier_settings.yaml' ``` With `alert = 'Slack'` and `email` set in the `1001.toml` file `nmm` @@ -119,7 +145,7 @@ submission_nmm ``` ```{r} -slurmtools::get_slurm_jobs() +slurmtools::get_slurm_jobs(user = "matthews") ``` ![nmm slack alerts](data/images/nmm_slack_notifications.png) @@ -137,9 +163,9 @@ slurmtools::get_slurm_jobs() # #removing generated files from running this vignette # nonmem <- file.path("model", "nonmem") # -# unlink(file.path(nonmem, "1001"), recursive = TRUE) -# unlink(file.path(nonmem, "1001.yaml")) -# unlink(file.path(nonmem, "1001.toml")) -# unlink(file.path(nonmem, "submission-log"), recursive = TRUE) -# unlink(file.path(nonmem, "in_progress"), recursive = TRUE) +unlink(file.path(nonmem, "1001"), recursive = TRUE) +unlink(file.path(nonmem, "1001.yaml")) +unlink(file.path(nonmem, "1001.toml")) +unlink(file.path(nonmem, "submission-log"), recursive = TRUE) +unlink(file.path(nonmem, "in_progress"), recursive = TRUE) ```