diff --git a/..Rcheck/00check.log b/..Rcheck/00check.log new file mode 100644 index 00000000..791d6fd3 --- /dev/null +++ b/..Rcheck/00check.log @@ -0,0 +1,9 @@ +* using log directory ‘/home/damir/software/batchtools/..Rcheck’ +* using R version 3.6.2 (2019-12-12) +* using platform: x86_64-pc-linux-gnu (64-bit) +* using session charset: UTF-8 +* checking for file ‘./DESCRIPTION’ ... ERROR +Required fields missing or empty: + ‘Author’ ‘Maintainer’ +* DONE +Status: 1 ERROR diff --git a/.Rhistory b/.Rhistory new file mode 100644 index 00000000..059cd30a --- /dev/null +++ b/.Rhistory @@ -0,0 +1,11 @@ +reticulate::repl_python() +setwd("./software/batchtools/") +library(devtools) +document() +document(".") +document("batchtools") +?document +pwd() +getwd() +devtools::check() +devtools::check(".") diff --git a/R/ExperimentRegistry.R b/R/ExperimentRegistry.R index 45d67237..7c6e36c0 100644 --- a/R/ExperimentRegistry.R +++ b/R/ExperimentRegistry.R @@ -48,10 +48,10 @@ #' tab = ljoin(pars, results) #' tab[, list(mres = mean(res)), by = c("n", "algorithm")] makeExperimentRegistry = function(file.dir = "registry", work.dir = getwd(), conf.file = findConfFile(), packages = character(0L), namespaces = character(0L), - source = character(0L), load = character(0L), seed = NULL, make.default = TRUE) { + source = character(0L), load = character(0L), seed = NULL, fix.seed = FALSE, make.default = TRUE) { reg = makeRegistry(file.dir = file.dir, work.dir = work.dir, conf.file = conf.file, - packages = packages, namespaces = namespaces, source = source, load = load, seed = seed, make.default = make.default) + packages = packages, namespaces = namespaces, source = source, load = load, seed = seed, fix.seed = fix.seed, make.default = make.default) fs::dir_create(fs::path(reg$file.dir, c("problems", "algorithms"))) diff --git a/R/Job.R b/R/Job.R index a1178820..30fedbf3 100644 --- a/R/Job.R +++ b/R/Job.R @@ -86,7 +86,19 @@ Experiment = R6Class("Experiment", cloneable = FALSE, inherit = BaseJob, return(result) } } - seed = if (is.null(p$seed)) self$seed else getSeed(p$seed, self$repl - 1L) + seed = if(p$fix.seed) { + if(is.null(p$seed)) { + self$seed + } else { + getSeed(p$seed, self$repl - 1L, p$fix.seed) + } + } else { + if(is.null(p$seed)) { + getSeed(self$seed, self$repl - 1L) + } else { + getSeed(p$seed, self$repl - 1L) + } + } wrapper = function(...) p$fun(job = self, data = p$data, ...) result = with_seed(seed, do.call(wrapper, self$prob.pars, envir = .GlobalEnv)) if (p$cache) @@ -167,15 +179,14 @@ makeJob = function(id, reader = NULL, reg = getDefaultRegistry()) { makeJob.Registry = function(id, reader = NULL, reg = getDefaultRegistry()) { row = mergedJobs(reg, convertId(reg, id), c("job.id", "job.pars", "resource.id")) resources = reg$resources[row, "resources", on = "resource.id", nomatch = NA]$resources[[1L]] %??% list() - Job$new(file.dir = reg$file.dir, reader %??% RDSReader$new(FALSE), id = row$job.id, job.pars = row$job.pars[[1L]], seed = getSeed(reg$seed, row$job.id), - resources = resources) + Job$new(file.dir = reg$file.dir, reader %??% RDSReader$new(FALSE), id = row$job.id, job.pars = row$job.pars[[1L]], seed = getSeed(reg$seed, row$job.id, reg$fix.seed), resources = resources) } #' @export makeJob.ExperimentRegistry = function(id, reader = NULL, reg = getDefaultRegistry()) { row = mergedJobs(reg, convertId(reg, id), c("job.id", "problem", "prob.pars", "algorithm", "algo.pars", "repl", "resource.id")) resources = reg$resources[row, "resources", on = "resource.id", nomatch = NA]$resources[[1L]] %??% list() - Experiment$new(file.dir = reg$file.dir, reader %??% RDSReader$new(FALSE), id = row$job.id, prob.pars = row$prob.pars[[1L]], algo.pars = row$algo.pars[[1L]], seed = getSeed(reg$seed, row$job.id), + Experiment$new(file.dir = reg$file.dir, reader %??% RDSReader$new(FALSE), id = row$job.id, prob.pars = row$prob.pars[[1L]], algo.pars = row$algo.pars[[1L]], seed = getSeed(reg$seed, row$job.id, reg$fix.seed), repl = row$repl, resources = resources, prob.name = row$problem, algo.name = row$algorithm) } @@ -185,12 +196,13 @@ getJob = function(jc, i, reader = NULL) { getJob.JobCollection = function(jc, i, reader = RDSReader$new(FALSE)) { row = jc$jobs[i] - Job$new(file.dir = jc$file.dir, reader = reader, id = row$job.id, job.pars = row$job.pars[[1L]], seed = getSeed(jc$seed, row$job.id), resources = jc$resources) + Job$new(file.dir = jc$file.dir, reader = reader, id = row$job.id, job.pars = row$job.pars[[1L]], seed = getSeed(jc$seed, row$job.id, jc$fix.seed), resources = jc$resources) } +#get back to this getJob.ExperimentCollection = function(jc, i, reader = RDSReader$new(FALSE)) { row = jc$jobs[i] Experiment$new(file.dir = jc$file.dir, reader = reader, id = row$job.id, prob.pars = row$prob.pars[[1L]], - algo.pars = row$algo.pars[[1L]], seed = getSeed(jc$seed, row$job.id), repl = row$repl, + algo.pars = row$algo.pars[[1L]], seed = getSeed(jc$seed, row$job.id, jc$fix.seed), repl = row$repl, resources = jc$resources, prob.name = row$problem, algo.name = row$algorithm, compress = jc$compress) } diff --git a/R/JobCollection.R b/R/JobCollection.R index 5840d7d5..098318bf 100644 --- a/R/JobCollection.R +++ b/R/JobCollection.R @@ -13,6 +13,7 @@ #' \item{resources:}{Named list of of specified computational resources.} #' \item{uri}{Location of the job description file (saved with \code{link[base]{saveRDS}} on the file system.} #' \item{seed}{\code{integer(1)} Seed of the \link{Registry}.} +#' \item{fix.seed}{\code{logical(1)} Fix.seed of the \link{Registry}.} #' \item{packages}{\code{character} with required packages to load via \code{\link[base]{require}}.} #' \item{namespaces}{code{character} with required packages to load via \code{\link[base]{requireNamespace}}.} #' \item{source}{\code{character} with list of files to source before execution.} @@ -54,6 +55,7 @@ createCollection = function(jobs, resources = list(), reg = getDefaultRegistry() jc$file.dir = reg$file.dir jc$work.dir = reg$work.dir jc$seed = reg$seed + jc$fix.seed = reg$fix.seed jc$uri = getJobFiles(reg, hash = jc$job.hash) jc$log.file = fs::path(reg$file.dir, "logs", sprintf("%s.log", jc$job.hash)) jc$packages = reg$packages diff --git a/R/Problem.R b/R/Problem.R index f5b8fb50..a6b77a10 100644 --- a/R/Problem.R +++ b/R/Problem.R @@ -34,6 +34,17 @@ #' see \code{\link{ExperimentRegistry}}. #' If \code{seed} is set to \code{NULL} (default), the job seed is used to instantiate the problem and #' different algorithms see different stochastic instances of the same problem. +#' @param fix.seed [\code{logical(1)}]\cr +#' Fix.seed for this problem. This allows to set the same seed for all problem instances so that +#' all algorithms are evaluated on the same stochastic instance. There are four cases for fix.seed and seed: +#' (1) If fix.seed is TRUE and \code{seed} is specified, then all stochastic instances are the same +#' and are set to \code{seed}. +#' (2)If fix.seed is TRUE and \code{seed} is not specified, then all stochastic instances are the same +#' and are set to registry seed. +#' (3)If fix.seed is FALSE (default) and \code{seed} is specified, then the seeding strategy is the same +#' as described in \code{seed}. +#' (4)If fix.seed is FALSE (default) and \code{seed} is not specified, then the seeding strategy is the same +#' as described in \code{seed}. #' @param cache [\code{logical(1)}]\cr #' If \code{TRUE} and \code{seed} is set, problem instances will be cached on the file system. #' This assumes that each problem instance is deterministic for each combination of hyperparameter setting @@ -64,7 +75,7 @@ #' tmp$problems #' tmp$algorithms #' getJobPars(reg = tmp) -addProblem = function(name, data = NULL, fun = NULL, seed = NULL, cache = FALSE, reg = getDefaultRegistry()) { +addProblem = function(name, data = NULL, fun = NULL, seed = NULL, fix.seed = FALSE, cache = FALSE, reg = getDefaultRegistry()) { assertRegistry(reg, class = "ExperimentRegistry", writeable = TRUE) assertString(name, min.chars = 1L) if (!stri_detect_regex(name, "^[[:alnum:]_.-]+$")) @@ -82,7 +93,7 @@ addProblem = function(name, data = NULL, fun = NULL, seed = NULL, cache = FALSE, } info("Adding problem '%s'", name) - prob = setClasses(list(name = name, seed = seed, cache = cache, data = data, fun = fun), "Problem") + prob = setClasses(list(name = name, seed = seed, fix.seed = fix.seed, cache = cache, data = data, fun = fun), "Problem") writeRDS(prob, file = getProblemURI(reg, name), compress = reg$compress) reg$problems = union(reg$problems, name) cache.dir = getProblemCacheDir(reg, name) diff --git a/R/Registry.R b/R/Registry.R index 373e51c5..89e61dbb 100644 --- a/R/Registry.R +++ b/R/Registry.R @@ -83,8 +83,11 @@ #' Files which should be loaded on the slaves prior to executing a job. #' Calls \code{\link[base]{load}} using the \code{\link[base]{.GlobalEnv}}. #' @param seed [\code{integer(1)}]\cr -#' Start seed for jobs. Each job uses the (\code{seed} + \code{job.id}) as seed. +#' Start seed for jobs. Each job uses the (\code{seed} + \code{job.id}) as seed, if fix.seed is FALSE. #' Default is a random integer between 1 and 32768 +#' @param fix.seed [\code{logical(1)}]\cr +#' Fix seed for jobs. If set to TRUE, each job uses the same seed. +#' Default is FALSE, which means each job uses the (\code{seed} + \code{job.id}) as seed. #' @param make.default [\code{logical(1)}]\cr #' If set to \code{TRUE}, the created registry is saved inside the package #' namespace and acts as default registry. You might want to switch this @@ -98,6 +101,7 @@ #' \item{\code{packages} [character()]:}{Packages to load on the slaves.} #' \item{\code{namespaces} [character()]:}{Namespaces to load on the slaves.} #' \item{\code{seed} [integer(1)]:}{Registry seed. Before each job is executed, the seed \code{seed + job.id} is set.} +#' \item{\code{fix.seed} [logical(1)]:}{Fix seed. Determine if to use the same seed for all computational jobs.} #' \item{\code{cluster.functions} [cluster.functions]:}{Usually set in your \code{conf.file}. Set via a call to \code{\link{makeClusterFunctions}}. See example.} #' \item{\code{default.resources} [named list()]:}{Usually set in your \code{conf.file}. Named list of default resources.} #' \item{\code{max.concurrent.jobs} [integer(1)]:}{Usually set in your \code{conf.file}. Maximum number of concurrent jobs for a single user and current registry on the system. @@ -123,7 +127,7 @@ #' tmp$packages = c("MASS") #' saveRegistry(reg = tmp) makeRegistry = function(file.dir = "registry", work.dir = getwd(), conf.file = findConfFile(), packages = character(0L), namespaces = character(0L), - source = character(0L), load = character(0L), seed = NULL, make.default = TRUE) { + source = character(0L), load = character(0L), seed = NULL, fix.seed = FALSE, make.default = TRUE) { assertString(file.dir, na.ok = TRUE) if (!is.na(file.dir)) assertPathForOutput(file.dir, overwrite = FALSE) @@ -145,6 +149,7 @@ makeRegistry = function(file.dir = "registry", work.dir = getwd(), conf.file = f reg$source = source reg$load = load reg$seed = seed + reg$fix.seed = fix.seed reg$writeable = TRUE reg$version = packageVersion("batchtools") diff --git a/R/helpers.R b/R/helpers.R index ee97b4ad..8a3903c0 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -120,11 +120,15 @@ Rscript = function() { fs::path(R.home("bin"), ifelse(testOS("windows"), "Rscript.exe", "Rscript")) } -getSeed = function(start.seed, id) { - if (id > .Machine$integer.max - start.seed) - start.seed - .Machine$integer.max + id - else - start.seed + id +getSeed = function(start.seed, id, fix.seed = FALSE) { + if(!fix.seed) { + if (id > .Machine$integer.max - start.seed) + start.seed - .Machine$integer.max + id + else + start.seed + id + } else { + start.seed + } } chsetdiff = function(x, y) { diff --git a/man/JobCollection.Rd b/man/JobCollection.Rd index 2f3fbc73..dc068341 100644 --- a/man/JobCollection.Rd +++ b/man/JobCollection.Rd @@ -5,7 +5,8 @@ \alias{JobCollection} \title{JobCollection Constructor} \usage{ -makeJobCollection(ids = NULL, resources = list(), reg = getDefaultRegistry()) +makeJobCollection(ids = NULL, resources = list(), + reg = getDefaultRegistry()) } \arguments{ \item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr @@ -37,6 +38,7 @@ with the following variables: \item{resources:}{Named list of of specified computational resources.} \item{uri}{Location of the job description file (saved with \code{link[base]{saveRDS}} on the file system.} \item{seed}{\code{integer(1)} Seed of the \link{Registry}.} + \item{fix.seed}{\code{logical(1)} Fix.seed of the \link{Registry}.} \item{packages}{\code{character} with required packages to load via \code{\link[base]{require}}.} \item{namespaces}{code{character} with required packages to load via \code{\link[base]{requireNamespace}}.} \item{source}{\code{character} with list of files to source before execution.} @@ -58,7 +60,6 @@ ls(jc) jc$resources } \seealso{ -Other JobCollection: -\code{\link{doJobCollection}()} +Other JobCollection: \code{\link{doJobCollection}} } \concept{JobCollection} diff --git a/man/Worker.Rd b/man/Worker.Rd index d290263d..3bdeb5a2 100644 --- a/man/Worker.Rd +++ b/man/Worker.Rd @@ -5,6 +5,9 @@ \alias{Worker} \title{Create a Linux-Worker} \format{An \code{\link{R6Class}} generator object} +\usage{ +Worker +} \value{ [\code{\link{Worker}}]. } @@ -40,3 +43,4 @@ Worker$new("localhost", ncpus = 4) } } +\keyword{datasets} diff --git a/man/addExperiments.Rd b/man/addExperiments.Rd index f6242673..2290bd41 100644 --- a/man/addExperiments.Rd +++ b/man/addExperiments.Rd @@ -4,13 +4,8 @@ \alias{addExperiments} \title{Add Experiments to the Registry} \usage{ -addExperiments( - prob.designs = NULL, - algo.designs = NULL, - repls = 1L, - combine = "crossprod", - reg = getDefaultRegistry() -) +addExperiments(prob.designs = NULL, algo.designs = NULL, repls = 1L, + combine = "crossprod", reg = getDefaultRegistry()) } \arguments{ \item{prob.designs}{[named list of \code{\link[base]{data.frame}}]\cr @@ -90,8 +85,7 @@ summarizeExperiments(reg = tmp) unwrap(getJobPars(reg = tmp)) } \seealso{ -Other Experiment: -\code{\link{removeExperiments}()}, -\code{\link{summarizeExperiments}()} +Other Experiment: \code{\link{removeExperiments}}, + \code{\link{summarizeExperiments}} } \concept{Experiment} diff --git a/man/addProblem.Rd b/man/addProblem.Rd index 4f67b2a0..3bcf9d9f 100644 --- a/man/addProblem.Rd +++ b/man/addProblem.Rd @@ -6,14 +6,8 @@ \alias{removeProblems} \title{Define Problems for Experiments} \usage{ -addProblem( - name, - data = NULL, - fun = NULL, - seed = NULL, - cache = FALSE, - reg = getDefaultRegistry() -) +addProblem(name, data = NULL, fun = NULL, seed = NULL, + fix.seed = FALSE, cache = FALSE, reg = getDefaultRegistry()) removeProblems(name, reg = getDefaultRegistry()) } @@ -43,6 +37,18 @@ see \code{\link{ExperimentRegistry}}. If \code{seed} is set to \code{NULL} (default), the job seed is used to instantiate the problem and different algorithms see different stochastic instances of the same problem.} +\item{fix.seed}{[\code{logical(1)}]\cr +Fix.seed for this problem. This allows to set the same seed for all problem instances so that +all algorithms are evaluated on the same stochastic instance. There are four cases for fix.seed and seed: +(1) If fix.seed is TRUE and \code{seed} is specified, then all stochastic instances are the same +and are set to \code{seed}. +(2)If fix.seed is TRUE and \code{seed} is not specified, then all stochastic instances are the same +and are set to registry seed. +(3)If fix.seed is FALSE (default) and \code{seed} is specified, then the seeding strategy is the same +as described in \code{seed}. +(4)If fix.seed is FALSE (default) and \code{seed} is not specified, then the seeding strategy is the same +as described in \code{seed}.} + \item{cache}{[\code{logical(1)}]\cr If \code{TRUE} and \code{seed} is set, problem instances will be cached on the file system. This assumes that each problem instance is deterministic for each combination of hyperparameter setting diff --git a/man/assertRegistry.Rd b/man/assertRegistry.Rd index fb4070f5..8ca3c362 100644 --- a/man/assertRegistry.Rd +++ b/man/assertRegistry.Rd @@ -4,13 +4,8 @@ \alias{assertRegistry} \title{assertRegistry} \usage{ -assertRegistry( - reg, - class = NULL, - writeable = FALSE, - sync = FALSE, - running.ok = TRUE -) +assertRegistry(reg, class = NULL, writeable = FALSE, sync = FALSE, + running.ok = TRUE) } \arguments{ \item{reg}{[\code{\link{Registry}}]\cr diff --git a/man/batchExport.Rd b/man/batchExport.Rd index ac52531a..e7af3d55 100644 --- a/man/batchExport.Rd +++ b/man/batchExport.Rd @@ -4,11 +4,8 @@ \alias{batchExport} \title{Export Objects to the Slaves} \usage{ -batchExport( - export = list(), - unexport = character(0L), - reg = getDefaultRegistry() -) +batchExport(export = list(), unexport = character(0L), + reg = getDefaultRegistry()) } \arguments{ \item{export}{[\code{list}]\cr diff --git a/man/batchMap.Rd b/man/batchMap.Rd index ef5f2cb8..9784ff8e 100644 --- a/man/batchMap.Rd +++ b/man/batchMap.Rd @@ -4,13 +4,8 @@ \alias{batchMap} \title{Map Operation for Batch Systems} \usage{ -batchMap( - fun, - ..., - args = list(), - more.args = list(), - reg = getDefaultRegistry() -) +batchMap(fun, ..., args = list(), more.args = list(), + reg = getDefaultRegistry()) } \arguments{ \item{fun}{[\code{function}]\cr diff --git a/man/batchMapResults.Rd b/man/batchMapResults.Rd index e6c58957..d36966bc 100644 --- a/man/batchMapResults.Rd +++ b/man/batchMapResults.Rd @@ -4,14 +4,8 @@ \alias{batchMapResults} \title{Map Over Results to Create New Jobs} \usage{ -batchMapResults( - fun, - ids = NULL, - ..., - more.args = list(), - target, - source = getDefaultRegistry() -) +batchMapResults(fun, ids = NULL, ..., more.args = list(), target, + source = getDefaultRegistry()) } \arguments{ \item{fun}{[\code{function}]\cr @@ -71,9 +65,8 @@ print(results) ijoin(results, unwrap(reduceResultsDataTable(reg = tmp)), by = c(".id" = "job.id")) } \seealso{ -Other Results: -\code{\link{loadResult}()}, -\code{\link{reduceResultsList}()}, -\code{\link{reduceResults}()} +Other Results: \code{\link{loadResult}}, + \code{\link{reduceResultsList}}, + \code{\link{reduceResults}} } \concept{Results} diff --git a/man/batchReduce.Rd b/man/batchReduce.Rd index 7170e2f1..ec3bd8d5 100644 --- a/man/batchReduce.Rd +++ b/man/batchReduce.Rd @@ -4,14 +4,8 @@ \alias{batchReduce} \title{Reduce Operation for Batch Systems} \usage{ -batchReduce( - fun, - xs, - init = NULL, - chunks = seq_along(xs), - more.args = list(), - reg = getDefaultRegistry() -) +batchReduce(fun, xs, init = NULL, chunks = seq_along(xs), + more.args = list(), reg = getDefaultRegistry()) } \arguments{ \item{fun}{[\code{function(aggr, x, ...)}]\cr diff --git a/man/batchtools-package.Rd b/man/batchtools-package.Rd index d598a13a..67d286a6 100644 --- a/man/batchtools-package.Rd +++ b/man/batchtools-package.Rd @@ -36,7 +36,7 @@ Useful links: } \author{ -\strong{Maintainer}: Michel Lang \email{michellang@gmail.com} (\href{https://orcid.org/0000-0001-9754-0393}{ORCID}) +\strong{Maintainer}: Michel Lang \email{michellang@gmail.com} (0000-0001-9754-0393) Authors: \itemize{ @@ -45,7 +45,7 @@ Authors: Other contributors: \itemize{ - \item Dirk Surmann \email{surmann@statistik.tu-dortmund.de} (\href{https://orcid.org/0000-0003-0873-137X}{ORCID}) [contributor] + \item Dirk Surmann \email{surmann@statistik.tu-dortmund.de} (0000-0003-0873-137X) [contributor] } } diff --git a/man/btlapply.Rd b/man/btlapply.Rd index 538bb7cc..8b14601a 100644 --- a/man/btlapply.Rd +++ b/man/btlapply.Rd @@ -5,27 +5,12 @@ \alias{btmapply} \title{Synchronous Apply Functions} \usage{ -btlapply( - X, - fun, - ..., - resources = list(), - n.chunks = NULL, - chunk.size = NULL, - reg = makeRegistry(file.dir = NA) -) +btlapply(X, fun, ..., resources = list(), n.chunks = NULL, + chunk.size = NULL, reg = makeRegistry(file.dir = NA)) -btmapply( - fun, - ..., - more.args = list(), - simplify = FALSE, - use.names = TRUE, - resources = list(), - n.chunks = NULL, - chunk.size = NULL, - reg = makeRegistry(file.dir = NA) -) +btmapply(fun, ..., more.args = list(), simplify = FALSE, + use.names = TRUE, resources = list(), n.chunks = NULL, + chunk.size = NULL, reg = makeRegistry(file.dir = NA)) } \arguments{ \item{X}{[\code{\link[base]{vector}}]\cr diff --git a/man/cfBrewTemplate.Rd b/man/cfBrewTemplate.Rd index 2543b0b8..e94c1d68 100644 --- a/man/cfBrewTemplate.Rd +++ b/man/cfBrewTemplate.Rd @@ -28,12 +28,11 @@ The file is stored at the same place as the corresponding job file in the \dQuot of your files directory. } \seealso{ -Other ClusterFunctionsHelper: -\code{\link{cfHandleUnknownSubmitError}()}, -\code{\link{cfKillJob}()}, -\code{\link{cfReadBrewTemplate}()}, -\code{\link{makeClusterFunctions}()}, -\code{\link{makeSubmitJobResult}()}, -\code{\link{runOSCommand}()} +Other ClusterFunctionsHelper: \code{\link{cfHandleUnknownSubmitError}}, + \code{\link{cfKillJob}}, + \code{\link{cfReadBrewTemplate}}, + \code{\link{makeClusterFunctions}}, + \code{\link{makeSubmitJobResult}}, + \code{\link{runOSCommand}} } \concept{ClusterFunctionsHelper} diff --git a/man/cfHandleUnknownSubmitError.Rd b/man/cfHandleUnknownSubmitError.Rd index 397c44c7..fc742767 100644 --- a/man/cfHandleUnknownSubmitError.Rd +++ b/man/cfHandleUnknownSubmitError.Rd @@ -27,12 +27,11 @@ Simply constructs a \code{\link{SubmitJobResult}} object with status code 101, N an informative error message containing the output of the OS command in \code{output}. } \seealso{ -Other ClusterFunctionsHelper: -\code{\link{cfBrewTemplate}()}, -\code{\link{cfKillJob}()}, -\code{\link{cfReadBrewTemplate}()}, -\code{\link{makeClusterFunctions}()}, -\code{\link{makeSubmitJobResult}()}, -\code{\link{runOSCommand}()} +Other ClusterFunctionsHelper: \code{\link{cfBrewTemplate}}, + \code{\link{cfKillJob}}, + \code{\link{cfReadBrewTemplate}}, + \code{\link{makeClusterFunctions}}, + \code{\link{makeSubmitJobResult}}, + \code{\link{runOSCommand}} } \concept{ClusterFunctionsHelper} diff --git a/man/cfKillJob.Rd b/man/cfKillJob.Rd index 13a12cd2..15cdf1a0 100644 --- a/man/cfKillJob.Rd +++ b/man/cfKillJob.Rd @@ -4,13 +4,8 @@ \alias{cfKillJob} \title{Cluster Functions Helper to Kill Batch Jobs} \usage{ -cfKillJob( - reg, - cmd, - args = character(0L), - max.tries = 3L, - nodename = "localhost" -) +cfKillJob(reg, cmd, args = character(0L), max.tries = 3L, + nodename = "localhost") } \arguments{ \item{reg}{[\code{\link{Registry}}]\cr @@ -41,12 +36,11 @@ command returns an exit code > 0, the command is repeated after a 1 second sleep \code{max.tries-1} times. If the command failed in all tries, an error is generated. } \seealso{ -Other ClusterFunctionsHelper: -\code{\link{cfBrewTemplate}()}, -\code{\link{cfHandleUnknownSubmitError}()}, -\code{\link{cfReadBrewTemplate}()}, -\code{\link{makeClusterFunctions}()}, -\code{\link{makeSubmitJobResult}()}, -\code{\link{runOSCommand}()} +Other ClusterFunctionsHelper: \code{\link{cfBrewTemplate}}, + \code{\link{cfHandleUnknownSubmitError}}, + \code{\link{cfReadBrewTemplate}}, + \code{\link{makeClusterFunctions}}, + \code{\link{makeSubmitJobResult}}, + \code{\link{runOSCommand}} } \concept{ClusterFunctionsHelper} diff --git a/man/cfReadBrewTemplate.Rd b/man/cfReadBrewTemplate.Rd index aa98f108..1110b847 100644 --- a/man/cfReadBrewTemplate.Rd +++ b/man/cfReadBrewTemplate.Rd @@ -23,12 +23,11 @@ This function is only intended for use in your own cluster functions implementat Simply reads your template file and returns it as a character vector. } \seealso{ -Other ClusterFunctionsHelper: -\code{\link{cfBrewTemplate}()}, -\code{\link{cfHandleUnknownSubmitError}()}, -\code{\link{cfKillJob}()}, -\code{\link{makeClusterFunctions}()}, -\code{\link{makeSubmitJobResult}()}, -\code{\link{runOSCommand}()} +Other ClusterFunctionsHelper: \code{\link{cfBrewTemplate}}, + \code{\link{cfHandleUnknownSubmitError}}, + \code{\link{cfKillJob}}, + \code{\link{makeClusterFunctions}}, + \code{\link{makeSubmitJobResult}}, + \code{\link{runOSCommand}} } \concept{ClusterFunctionsHelper} diff --git a/man/clearRegistry.Rd b/man/clearRegistry.Rd index ec50c624..89f989bf 100644 --- a/man/clearRegistry.Rd +++ b/man/clearRegistry.Rd @@ -14,13 +14,9 @@ Registry. If not explicitly passed, uses the default registry (see \code{\link{s Removes all jobs from a registry and calls \code{\link{sweepRegistry}}. } \seealso{ -Other Registry: -\code{\link{getDefaultRegistry}()}, -\code{\link{loadRegistry}()}, -\code{\link{makeRegistry}()}, -\code{\link{removeRegistry}()}, -\code{\link{saveRegistry}()}, -\code{\link{sweepRegistry}()}, -\code{\link{syncRegistry}()} +Other Registry: \code{\link{getDefaultRegistry}}, + \code{\link{loadRegistry}}, \code{\link{makeRegistry}}, + \code{\link{removeRegistry}}, \code{\link{saveRegistry}}, + \code{\link{sweepRegistry}}, \code{\link{syncRegistry}} } \concept{Registry} diff --git a/man/doJobCollection.Rd b/man/doJobCollection.Rd index 29c8f0c6..292a40dc 100644 --- a/man/doJobCollection.Rd +++ b/man/doJobCollection.Rd @@ -32,7 +32,6 @@ jc = makeJobCollection(1:2, reg = tmp) doJobCollection(jc) } \seealso{ -Other JobCollection: -\code{\link{makeJobCollection}()} +Other JobCollection: \code{\link{makeJobCollection}} } \concept{JobCollection} diff --git a/man/findJobs.Rd b/man/findJobs.Rd index ca7b9413..8c95ec7d 100644 --- a/man/findJobs.Rd +++ b/man/findJobs.Rd @@ -19,17 +19,10 @@ \usage{ findJobs(expr, ids = NULL, reg = getDefaultRegistry()) -findExperiments( - ids = NULL, - prob.name = NA_character_, - prob.pattern = NA_character_, - algo.name = NA_character_, - algo.pattern = NA_character_, - prob.pars, - algo.pars, - repls = NULL, - reg = getDefaultRegistry() -) +findExperiments(ids = NULL, prob.name = NA_character_, + prob.pattern = NA_character_, algo.name = NA_character_, + algo.pattern = NA_character_, prob.pars, algo.pars, repls = NULL, + reg = getDefaultRegistry()) findSubmitted(ids = NULL, reg = getDefaultRegistry()) @@ -53,7 +46,8 @@ findQueued(ids = NULL, reg = getDefaultRegistry()) findExpired(ids = NULL, reg = getDefaultRegistry()) -findTagged(tags = character(0L), ids = NULL, reg = getDefaultRegistry()) +findTagged(tags = character(0L), ids = NULL, + reg = getDefaultRegistry()) } \arguments{ \item{expr}{[\code{expression}]\cr diff --git a/man/getDefaultRegistry.Rd b/man/getDefaultRegistry.Rd index da51af88..e81eae35 100644 --- a/man/getDefaultRegistry.Rd +++ b/man/getDefaultRegistry.Rd @@ -19,13 +19,9 @@ stops with an exception if none is set). \code{setDefaultRegistry} sets a registry as default. } \seealso{ -Other Registry: -\code{\link{clearRegistry}()}, -\code{\link{loadRegistry}()}, -\code{\link{makeRegistry}()}, -\code{\link{removeRegistry}()}, -\code{\link{saveRegistry}()}, -\code{\link{sweepRegistry}()}, -\code{\link{syncRegistry}()} +Other Registry: \code{\link{clearRegistry}}, + \code{\link{loadRegistry}}, \code{\link{makeRegistry}}, + \code{\link{removeRegistry}}, \code{\link{saveRegistry}}, + \code{\link{sweepRegistry}}, \code{\link{syncRegistry}} } \concept{Registry} diff --git a/man/getErrorMessages.Rd b/man/getErrorMessages.Rd index 58850d55..a1388a56 100644 --- a/man/getErrorMessages.Rd +++ b/man/getErrorMessages.Rd @@ -4,11 +4,8 @@ \alias{getErrorMessages} \title{Retrieve Error Messages} \usage{ -getErrorMessages( - ids = NULL, - missing.as.error = FALSE, - reg = getDefaultRegistry() -) +getErrorMessages(ids = NULL, missing.as.error = FALSE, + reg = getDefaultRegistry()) } \arguments{ \item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr @@ -43,12 +40,9 @@ getErrorMessages(ids, reg = tmp) getErrorMessages(ids, missing.as.error = TRUE, reg = tmp) } \seealso{ -Other debug: -\code{\link{getStatus}()}, -\code{\link{grepLogs}()}, -\code{\link{killJobs}()}, -\code{\link{resetJobs}()}, -\code{\link{showLog}()}, -\code{\link{testJob}()} +Other debug: \code{\link{getStatus}}, + \code{\link{grepLogs}}, \code{\link{killJobs}}, + \code{\link{resetJobs}}, \code{\link{showLog}}, + \code{\link{testJob}} } \concept{debug} diff --git a/man/getStatus.Rd b/man/getStatus.Rd index 00d327df..23b8e29d 100644 --- a/man/getStatus.Rd +++ b/man/getStatus.Rd @@ -52,12 +52,9 @@ str(tab) \seealso{ \code{\link{findJobs}} -Other debug: -\code{\link{getErrorMessages}()}, -\code{\link{grepLogs}()}, -\code{\link{killJobs}()}, -\code{\link{resetJobs}()}, -\code{\link{showLog}()}, -\code{\link{testJob}()} +Other debug: \code{\link{getErrorMessages}}, + \code{\link{grepLogs}}, \code{\link{killJobs}}, + \code{\link{resetJobs}}, \code{\link{showLog}}, + \code{\link{testJob}} } \concept{debug} diff --git a/man/grepLogs.Rd b/man/grepLogs.Rd index fd8b8645..c6955b4e 100644 --- a/man/grepLogs.Rd +++ b/man/grepLogs.Rd @@ -4,13 +4,8 @@ \alias{grepLogs} \title{Grep Log Files for a Pattern} \usage{ -grepLogs( - ids = NULL, - pattern, - ignore.case = FALSE, - fixed = FALSE, - reg = getDefaultRegistry() -) +grepLogs(ids = NULL, pattern, ignore.case = FALSE, fixed = FALSE, + reg = getDefaultRegistry()) } \arguments{ \item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr @@ -40,12 +35,9 @@ Crawls through log files and reports jobs with lines matching the \code{pattern} See \code{\link{showLog}} for an example. } \seealso{ -Other debug: -\code{\link{getErrorMessages}()}, -\code{\link{getStatus}()}, -\code{\link{killJobs}()}, -\code{\link{resetJobs}()}, -\code{\link{showLog}()}, -\code{\link{testJob}()} +Other debug: \code{\link{getErrorMessages}}, + \code{\link{getStatus}}, \code{\link{killJobs}}, + \code{\link{resetJobs}}, \code{\link{showLog}}, + \code{\link{testJob}} } \concept{debug} diff --git a/man/killJobs.Rd b/man/killJobs.Rd index 8c5a4451..76a861b3 100644 --- a/man/killJobs.Rd +++ b/man/killJobs.Rd @@ -29,12 +29,9 @@ batch jobs again. If this fails three times for some jobs, the function gives up successfully killed are reset in the \link{Registry}. } \seealso{ -Other debug: -\code{\link{getErrorMessages}()}, -\code{\link{getStatus}()}, -\code{\link{grepLogs}()}, -\code{\link{resetJobs}()}, -\code{\link{showLog}()}, -\code{\link{testJob}()} +Other debug: \code{\link{getErrorMessages}}, + \code{\link{getStatus}}, \code{\link{grepLogs}}, + \code{\link{resetJobs}}, \code{\link{showLog}}, + \code{\link{testJob}} } \concept{debug} diff --git a/man/loadRegistry.Rd b/man/loadRegistry.Rd index 52e05f4b..2ff2806b 100644 --- a/man/loadRegistry.Rd +++ b/man/loadRegistry.Rd @@ -4,13 +4,8 @@ \alias{loadRegistry} \title{Load a Registry from the File System} \usage{ -loadRegistry( - file.dir, - work.dir = NULL, - conf.file = findConfFile(), - make.default = TRUE, - writeable = FALSE -) +loadRegistry(file.dir, work.dir = NULL, conf.file = findConfFile(), + make.default = TRUE, writeable = FALSE) } \arguments{ \item{file.dir}{[\code{character(1)}]\cr @@ -82,13 +77,10 @@ Thus, set to \code{writeable} to \code{TRUE} if and only if you are absolutely s If you need write access, load the registry with \code{writeable} set to \code{TRUE}. } \seealso{ -Other Registry: -\code{\link{clearRegistry}()}, -\code{\link{getDefaultRegistry}()}, -\code{\link{makeRegistry}()}, -\code{\link{removeRegistry}()}, -\code{\link{saveRegistry}()}, -\code{\link{sweepRegistry}()}, -\code{\link{syncRegistry}()} +Other Registry: \code{\link{clearRegistry}}, + \code{\link{getDefaultRegistry}}, + \code{\link{makeRegistry}}, \code{\link{removeRegistry}}, + \code{\link{saveRegistry}}, \code{\link{sweepRegistry}}, + \code{\link{syncRegistry}} } \concept{Registry} diff --git a/man/loadResult.Rd b/man/loadResult.Rd index 8126fcd7..7f712bb9 100644 --- a/man/loadResult.Rd +++ b/man/loadResult.Rd @@ -21,9 +21,8 @@ Registry. If not explicitly passed, uses the default registry (see \code{\link{s Loads the result of a single job. } \seealso{ -Other Results: -\code{\link{batchMapResults}()}, -\code{\link{reduceResultsList}()}, -\code{\link{reduceResults}()} +Other Results: \code{\link{batchMapResults}}, + \code{\link{reduceResultsList}}, + \code{\link{reduceResults}} } \concept{Results} diff --git a/man/makeClusterFunctions.Rd b/man/makeClusterFunctions.Rd index 5df5dff2..18a87816 100644 --- a/man/makeClusterFunctions.Rd +++ b/man/makeClusterFunctions.Rd @@ -5,19 +5,11 @@ \alias{ClusterFunctions} \title{ClusterFunctions Constructor} \usage{ -makeClusterFunctions( - name, - submitJob, - killJob = NULL, - listJobsQueued = NULL, - listJobsRunning = NULL, - array.var = NA_character_, - store.job.collection = FALSE, - store.job.files = FALSE, - scheduler.latency = 0, - fs.latency = 0, - hooks = list() -) +makeClusterFunctions(name, submitJob, killJob = NULL, + listJobsQueued = NULL, listJobsRunning = NULL, + array.var = NA_character_, store.job.collection = FALSE, + store.job.files = FALSE, scheduler.latency = 0, fs.latency = 0, + hooks = list()) } \arguments{ \item{name}{[\code{character(1)}]\cr @@ -81,25 +73,23 @@ Note that some standard implementations for TORQUE, Slurm, LSF, SGE, etc. ship with the package. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}} -Other ClusterFunctionsHelper: -\code{\link{cfBrewTemplate}()}, -\code{\link{cfHandleUnknownSubmitError}()}, -\code{\link{cfKillJob}()}, -\code{\link{cfReadBrewTemplate}()}, -\code{\link{makeSubmitJobResult}()}, -\code{\link{runOSCommand}()} +Other ClusterFunctionsHelper: \code{\link{cfBrewTemplate}}, + \code{\link{cfHandleUnknownSubmitError}}, + \code{\link{cfKillJob}}, + \code{\link{cfReadBrewTemplate}}, + \code{\link{makeSubmitJobResult}}, + \code{\link{runOSCommand}} } \concept{ClusterFunctions} \concept{ClusterFunctionsHelper} diff --git a/man/makeClusterFunctionsDocker.Rd b/man/makeClusterFunctionsDocker.Rd index 0ae80dbc..e536c48a 100644 --- a/man/makeClusterFunctionsDocker.Rd +++ b/man/makeClusterFunctionsDocker.Rd @@ -4,13 +4,8 @@ \alias{makeClusterFunctionsDocker} \title{ClusterFunctions for Docker} \usage{ -makeClusterFunctionsDocker( - image, - docker.args = character(0L), - image.args = character(0L), - scheduler.latency = 1, - fs.latency = 65 -) +makeClusterFunctionsDocker(image, docker.args = character(0L), + image.args = character(0L), scheduler.latency = 1, fs.latency = 65) } \arguments{ \item{image}{[\code{character(1)}]\cr @@ -59,16 +54,15 @@ Use \code{docker ps -a --filter 'label=batchtools' --filter 'status=exited'} to containers manually (or usa a cron job). } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsInteractive.Rd b/man/makeClusterFunctionsInteractive.Rd index 2330134c..d6e81468 100644 --- a/man/makeClusterFunctionsInteractive.Rd +++ b/man/makeClusterFunctionsInteractive.Rd @@ -4,11 +4,8 @@ \alias{makeClusterFunctionsInteractive} \title{ClusterFunctions for Sequential Execution in the Running R Session} \usage{ -makeClusterFunctionsInteractive( - external = FALSE, - write.logs = TRUE, - fs.latency = 0 -) +makeClusterFunctionsInteractive(external = FALSE, write.logs = TRUE, + fs.latency = 0) } \arguments{ \item{external}{[\code{logical(1)}]\cr @@ -39,16 +36,15 @@ Listing jobs returns an empty vector (as no jobs can be running when you call th and \code{killJob} is not implemented for the same reasons. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsLSF.Rd b/man/makeClusterFunctionsLSF.Rd index 682e50f9..42b53575 100644 --- a/man/makeClusterFunctionsLSF.Rd +++ b/man/makeClusterFunctionsLSF.Rd @@ -4,11 +4,8 @@ \alias{makeClusterFunctionsLSF} \title{ClusterFunctions for LSF Systems} \usage{ -makeClusterFunctionsLSF( - template = "lsf", - scheduler.latency = 1, - fs.latency = 65 -) +makeClusterFunctionsLSF(template = "lsf", scheduler.latency = 1, + fs.latency = 65) } \arguments{ \item{template}{[\code{character(1)}]\cr @@ -53,16 +50,15 @@ allocations. Array jobs are currently not supported. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsMulticore.Rd b/man/makeClusterFunctionsMulticore.Rd index ef766b2c..b5b389a5 100644 --- a/man/makeClusterFunctionsMulticore.Rd +++ b/man/makeClusterFunctionsMulticore.Rd @@ -26,16 +26,15 @@ Jobs are spawned asynchronously using the functions \code{mcparallel} and \code{ Does not work on Windows, use \code{\link{makeClusterFunctionsSocket}} instead. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsOpenLava.Rd b/man/makeClusterFunctionsOpenLava.Rd index 88ebc683..341fb2a8 100644 --- a/man/makeClusterFunctionsOpenLava.Rd +++ b/man/makeClusterFunctionsOpenLava.Rd @@ -4,11 +4,8 @@ \alias{makeClusterFunctionsOpenLava} \title{ClusterFunctions for OpenLava} \usage{ -makeClusterFunctionsOpenLava( - template = "openlava", - scheduler.latency = 1, - fs.latency = 65 -) +makeClusterFunctionsOpenLava(template = "openlava", + scheduler.latency = 1, fs.latency = 65) } \arguments{ \item{template}{[\code{character(1)}]\cr @@ -53,16 +50,15 @@ allocations. Array jobs are currently not supported. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsSGE.Rd b/man/makeClusterFunctionsSGE.Rd index d9164a1b..1cc81b3d 100644 --- a/man/makeClusterFunctionsSGE.Rd +++ b/man/makeClusterFunctionsSGE.Rd @@ -4,12 +4,8 @@ \alias{makeClusterFunctionsSGE} \title{ClusterFunctions for SGE Systems} \usage{ -makeClusterFunctionsSGE( - template = "sge", - nodename = "localhost", - scheduler.latency = 1, - fs.latency = 65 -) +makeClusterFunctionsSGE(template = "sge", nodename = "localhost", + scheduler.latency = 1, fs.latency = 65) } \arguments{ \item{template}{[\code{character(1)}]\cr @@ -63,16 +59,15 @@ allocations. Array jobs are currently not supported. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsSSH.Rd b/man/makeClusterFunctionsSSH.Rd index 77ddd4a1..9044753f 100644 --- a/man/makeClusterFunctionsSSH.Rd +++ b/man/makeClusterFunctionsSSH.Rd @@ -37,16 +37,15 @@ makeClusterFunctionsSSH(list(Worker$new("localhost", ncpus = 2))) } } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsSlurm.Rd b/man/makeClusterFunctionsSlurm.Rd index 3e1c0f75..6e01208a 100644 --- a/man/makeClusterFunctionsSlurm.Rd +++ b/man/makeClusterFunctionsSlurm.Rd @@ -4,13 +4,8 @@ \alias{makeClusterFunctionsSlurm} \title{ClusterFunctions for Slurm Systems} \usage{ -makeClusterFunctionsSlurm( - template = "slurm", - array.jobs = TRUE, - nodename = "localhost", - scheduler.latency = 1, - fs.latency = 65 -) +makeClusterFunctionsSlurm(template = "slurm", array.jobs = TRUE, + nodename = "localhost", scheduler.latency = 1, fs.latency = 65) } \arguments{ \item{template}{[\code{character(1)}]\cr @@ -66,16 +61,15 @@ Note that you might have to specify the cluster name here if you do not want to otherwise the commands for listing and killing jobs will not work. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsSocket.Rd b/man/makeClusterFunctionsSocket.Rd index 962d1058..fe193963 100644 --- a/man/makeClusterFunctionsSocket.Rd +++ b/man/makeClusterFunctionsSocket.Rd @@ -25,16 +25,15 @@ Usually safe to set to \code{0} to disable the heuristic, e.g. if you are workin Jobs are spawned asynchronously using the package \pkg{snow}. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsTORQUE}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsTORQUE}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeClusterFunctionsTORQUE.Rd b/man/makeClusterFunctionsTORQUE.Rd index c9102ddd..a6a33ca0 100644 --- a/man/makeClusterFunctionsTORQUE.Rd +++ b/man/makeClusterFunctionsTORQUE.Rd @@ -4,11 +4,8 @@ \alias{makeClusterFunctionsTORQUE} \title{ClusterFunctions for OpenPBS/TORQUE Systems} \usage{ -makeClusterFunctionsTORQUE( - template = "torque", - scheduler.latency = 1, - fs.latency = 65 -) +makeClusterFunctionsTORQUE(template = "torque", scheduler.latency = 1, + fs.latency = 65) } \arguments{ \item{template}{[\code{character(1)}]\cr @@ -49,16 +46,15 @@ It is the template file's job to choose a queue for the job and handle the desir allocations. } \seealso{ -Other ClusterFunctions: -\code{\link{makeClusterFunctionsDocker}()}, -\code{\link{makeClusterFunctionsInteractive}()}, -\code{\link{makeClusterFunctionsLSF}()}, -\code{\link{makeClusterFunctionsMulticore}()}, -\code{\link{makeClusterFunctionsOpenLava}()}, -\code{\link{makeClusterFunctionsSGE}()}, -\code{\link{makeClusterFunctionsSSH}()}, -\code{\link{makeClusterFunctionsSlurm}()}, -\code{\link{makeClusterFunctionsSocket}()}, -\code{\link{makeClusterFunctions}()} +Other ClusterFunctions: \code{\link{makeClusterFunctionsDocker}}, + \code{\link{makeClusterFunctionsInteractive}}, + \code{\link{makeClusterFunctionsLSF}}, + \code{\link{makeClusterFunctionsMulticore}}, + \code{\link{makeClusterFunctionsOpenLava}}, + \code{\link{makeClusterFunctionsSGE}}, + \code{\link{makeClusterFunctionsSSH}}, + \code{\link{makeClusterFunctionsSlurm}}, + \code{\link{makeClusterFunctionsSocket}}, + \code{\link{makeClusterFunctions}} } \concept{ClusterFunctions} diff --git a/man/makeExperimentRegistry.Rd b/man/makeExperimentRegistry.Rd index 8f7c6ea9..d7caf0e6 100644 --- a/man/makeExperimentRegistry.Rd +++ b/man/makeExperimentRegistry.Rd @@ -5,17 +5,11 @@ \alias{ExperimentRegistry} \title{ExperimentRegistry Constructor} \usage{ -makeExperimentRegistry( - file.dir = "registry", - work.dir = getwd(), - conf.file = findConfFile(), - packages = character(0L), - namespaces = character(0L), - source = character(0L), - load = character(0L), - seed = NULL, - make.default = TRUE -) +makeExperimentRegistry(file.dir = "registry", work.dir = getwd(), + conf.file = findConfFile(), packages = character(0L), + namespaces = character(0L), source = character(0L), + load = character(0L), seed = NULL, fix.seed = FALSE, + make.default = TRUE) } \arguments{ \item{file.dir}{[\code{character(1)}]\cr @@ -76,9 +70,13 @@ Files which should be loaded on the slaves prior to executing a job. Calls \code{\link[base]{load}} using the \code{\link[base]{.GlobalEnv}}.} \item{seed}{[\code{integer(1)}]\cr -Start seed for jobs. Each job uses the (\code{seed} + \code{job.id}) as seed. +Start seed for jobs. Each job uses the (\code{seed} + \code{job.id}) as seed, if fix.seed is FALSE. Default is a random integer between 1 and 32768} +\item{fix.seed}{[\code{logical(1)}]\cr +Fix seed for jobs. If set to TRUE, each job uses the same seed. +Default is FALSE, which means each job uses the (\code{seed} + \code{job.id}) as seed.} + \item{make.default}{[\code{logical(1)}]\cr If set to \code{TRUE}, the created registry is saved inside the package namespace and acts as default registry. You might want to switch this diff --git a/man/makeRegistry.Rd b/man/makeRegistry.Rd index a9f851f6..494c1a0e 100644 --- a/man/makeRegistry.Rd +++ b/man/makeRegistry.Rd @@ -5,17 +5,11 @@ \alias{Registry} \title{Registry Constructor} \usage{ -makeRegistry( - file.dir = "registry", - work.dir = getwd(), - conf.file = findConfFile(), - packages = character(0L), - namespaces = character(0L), - source = character(0L), - load = character(0L), - seed = NULL, - make.default = TRUE -) +makeRegistry(file.dir = "registry", work.dir = getwd(), + conf.file = findConfFile(), packages = character(0L), + namespaces = character(0L), source = character(0L), + load = character(0L), seed = NULL, fix.seed = FALSE, + make.default = TRUE) } \arguments{ \item{file.dir}{[\code{character(1)}]\cr @@ -76,9 +70,13 @@ Files which should be loaded on the slaves prior to executing a job. Calls \code{\link[base]{load}} using the \code{\link[base]{.GlobalEnv}}.} \item{seed}{[\code{integer(1)}]\cr -Start seed for jobs. Each job uses the (\code{seed} + \code{job.id}) as seed. +Start seed for jobs. Each job uses the (\code{seed} + \code{job.id}) as seed, if fix.seed is FALSE. Default is a random integer between 1 and 32768} +\item{fix.seed}{[\code{logical(1)}]\cr +Fix seed for jobs. If set to TRUE, each job uses the same seed. +Default is FALSE, which means each job uses the (\code{seed} + \code{job.id}) as seed.} + \item{make.default}{[\code{logical(1)}]\cr If set to \code{TRUE}, the created registry is saved inside the package namespace and acts as default registry. You might want to switch this @@ -94,6 +92,7 @@ Default is \code{TRUE}.} \item{\code{packages} [character()]:}{Packages to load on the slaves.} \item{\code{namespaces} [character()]:}{Namespaces to load on the slaves.} \item{\code{seed} [integer(1)]:}{Registry seed. Before each job is executed, the seed \code{seed + job.id} is set.} + \item{\code{fix.seed} [logical(1)]:}{Fix seed. Determine if to use the same seed for all computational jobs.} \item{\code{cluster.functions} [cluster.functions]:}{Usually set in your \code{conf.file}. Set via a call to \code{\link{makeClusterFunctions}}. See example.} \item{\code{default.resources} [named list()]:}{Usually set in your \code{conf.file}. Named list of default resources.} \item{\code{max.concurrent.jobs} [integer(1)]:}{Usually set in your \code{conf.file}. Maximum number of concurrent jobs for a single user and current registry on the system. @@ -150,13 +149,10 @@ tmp$packages = c("MASS") saveRegistry(reg = tmp) } \seealso{ -Other Registry: -\code{\link{clearRegistry}()}, -\code{\link{getDefaultRegistry}()}, -\code{\link{loadRegistry}()}, -\code{\link{removeRegistry}()}, -\code{\link{saveRegistry}()}, -\code{\link{sweepRegistry}()}, -\code{\link{syncRegistry}()} +Other Registry: \code{\link{clearRegistry}}, + \code{\link{getDefaultRegistry}}, + \code{\link{loadRegistry}}, \code{\link{removeRegistry}}, + \code{\link{saveRegistry}}, \code{\link{sweepRegistry}}, + \code{\link{syncRegistry}} } \concept{Registry} diff --git a/man/makeSubmitJobResult.Rd b/man/makeSubmitJobResult.Rd index ba3e70d3..95e682e4 100644 --- a/man/makeSubmitJobResult.Rd +++ b/man/makeSubmitJobResult.Rd @@ -5,12 +5,8 @@ \alias{SubmitJobResult} \title{Create a SubmitJobResult} \usage{ -makeSubmitJobResult( - status, - batch.id, - log.file = NA_character_, - msg = NA_character_ -) +makeSubmitJobResult(status, batch.id, log.file = NA_character_, + msg = NA_character_) } \arguments{ \item{status}{[\code{integer(1)}]\cr @@ -41,12 +37,11 @@ Use this function in your implementation of \code{\link{makeClusterFunctions}} t value for the \code{submitJob} function. } \seealso{ -Other ClusterFunctionsHelper: -\code{\link{cfBrewTemplate}()}, -\code{\link{cfHandleUnknownSubmitError}()}, -\code{\link{cfKillJob}()}, -\code{\link{cfReadBrewTemplate}()}, -\code{\link{makeClusterFunctions}()}, -\code{\link{runOSCommand}()} +Other ClusterFunctionsHelper: \code{\link{cfBrewTemplate}}, + \code{\link{cfHandleUnknownSubmitError}}, + \code{\link{cfKillJob}}, + \code{\link{cfReadBrewTemplate}}, + \code{\link{makeClusterFunctions}}, + \code{\link{runOSCommand}} } \concept{ClusterFunctionsHelper} diff --git a/man/reduceResults.Rd b/man/reduceResults.Rd index 61487d61..fa635c3b 100644 --- a/man/reduceResults.Rd +++ b/man/reduceResults.Rd @@ -88,9 +88,7 @@ res = reduceResultsList(reg = tmp) Reduce(comb, res) } \seealso{ -Other Results: -\code{\link{batchMapResults}()}, -\code{\link{loadResult}()}, -\code{\link{reduceResultsList}()} +Other Results: \code{\link{batchMapResults}}, + \code{\link{loadResult}}, \code{\link{reduceResultsList}} } \concept{Results} diff --git a/man/reduceResultsList.Rd b/man/reduceResultsList.Rd index 0900d627..3584b8f9 100644 --- a/man/reduceResultsList.Rd +++ b/man/reduceResultsList.Rd @@ -5,21 +5,11 @@ \alias{reduceResultsDataTable} \title{Apply Functions on Results} \usage{ -reduceResultsList( - ids = NULL, - fun = NULL, - ..., - missing.val, - reg = getDefaultRegistry() -) +reduceResultsList(ids = NULL, fun = NULL, ..., missing.val, + reg = getDefaultRegistry()) -reduceResultsDataTable( - ids = NULL, - fun = NULL, - ..., - missing.val, - reg = getDefaultRegistry() -) +reduceResultsDataTable(ids = NULL, fun = NULL, ..., missing.val, + reg = getDefaultRegistry()) } \arguments{ \item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr @@ -110,9 +100,7 @@ unwrap(res, sep = ".") \seealso{ \code{\link{reduceResults}} -Other Results: -\code{\link{batchMapResults}()}, -\code{\link{loadResult}()}, -\code{\link{reduceResults}()} +Other Results: \code{\link{batchMapResults}}, + \code{\link{loadResult}}, \code{\link{reduceResults}} } \concept{Results} diff --git a/man/removeExperiments.Rd b/man/removeExperiments.Rd index 6a7de4cd..d6ff7a5b 100644 --- a/man/removeExperiments.Rd +++ b/man/removeExperiments.Rd @@ -27,8 +27,7 @@ However, if the implemented heuristic fails, this can lead to inconsistencies in Use with care while jobs are running. } \seealso{ -Other Experiment: -\code{\link{addExperiments}()}, -\code{\link{summarizeExperiments}()} +Other Experiment: \code{\link{addExperiments}}, + \code{\link{summarizeExperiments}} } \concept{Experiment} diff --git a/man/removeRegistry.Rd b/man/removeRegistry.Rd index 16772b67..98c2d98c 100644 --- a/man/removeRegistry.Rd +++ b/man/removeRegistry.Rd @@ -28,13 +28,10 @@ tmp = makeRegistry(file.dir = NA, make.default = FALSE) removeRegistry(0, tmp) } \seealso{ -Other Registry: -\code{\link{clearRegistry}()}, -\code{\link{getDefaultRegistry}()}, -\code{\link{loadRegistry}()}, -\code{\link{makeRegistry}()}, -\code{\link{saveRegistry}()}, -\code{\link{sweepRegistry}()}, -\code{\link{syncRegistry}()} +Other Registry: \code{\link{clearRegistry}}, + \code{\link{getDefaultRegistry}}, + \code{\link{loadRegistry}}, \code{\link{makeRegistry}}, + \code{\link{saveRegistry}}, \code{\link{sweepRegistry}}, + \code{\link{syncRegistry}} } \concept{Registry} diff --git a/man/resetJobs.Rd b/man/resetJobs.Rd index 4a2a3e9e..5e861fc3 100644 --- a/man/resetJobs.Rd +++ b/man/resetJobs.Rd @@ -28,12 +28,9 @@ However, if the implemented heuristic fails, this can lead to inconsistencies in Use with care while jobs are running. } \seealso{ -Other debug: -\code{\link{getErrorMessages}()}, -\code{\link{getStatus}()}, -\code{\link{grepLogs}()}, -\code{\link{killJobs}()}, -\code{\link{showLog}()}, -\code{\link{testJob}()} +Other debug: \code{\link{getErrorMessages}}, + \code{\link{getStatus}}, \code{\link{grepLogs}}, + \code{\link{killJobs}}, \code{\link{showLog}}, + \code{\link{testJob}} } \concept{debug} diff --git a/man/runOSCommand.Rd b/man/runOSCommand.Rd index 9d8b271a..4a993d9a 100644 --- a/man/runOSCommand.Rd +++ b/man/runOSCommand.Rd @@ -4,12 +4,8 @@ \alias{runOSCommand} \title{Run OS Commands on Local or Remote Machines} \usage{ -runOSCommand( - sys.cmd, - sys.args = character(0L), - stdin = "", - nodename = "localhost" -) +runOSCommand(sys.cmd, sys.args = character(0L), stdin = "", + nodename = "localhost") } \arguments{ \item{sys.cmd}{[\code{character(1)}]\cr @@ -41,12 +37,11 @@ runOSCommand("notfound") } } \seealso{ -Other ClusterFunctionsHelper: -\code{\link{cfBrewTemplate}()}, -\code{\link{cfHandleUnknownSubmitError}()}, -\code{\link{cfKillJob}()}, -\code{\link{cfReadBrewTemplate}()}, -\code{\link{makeClusterFunctions}()}, -\code{\link{makeSubmitJobResult}()} +Other ClusterFunctionsHelper: \code{\link{cfBrewTemplate}}, + \code{\link{cfHandleUnknownSubmitError}}, + \code{\link{cfKillJob}}, + \code{\link{cfReadBrewTemplate}}, + \code{\link{makeClusterFunctions}}, + \code{\link{makeSubmitJobResult}} } \concept{ClusterFunctionsHelper} diff --git a/man/saveRegistry.Rd b/man/saveRegistry.Rd index f6f1a3f9..1b2d6f3d 100644 --- a/man/saveRegistry.Rd +++ b/man/saveRegistry.Rd @@ -21,13 +21,10 @@ for construction in \code{\link{makeRegistry}}, can be accessed via This function is usually called internally whenever needed. } \seealso{ -Other Registry: -\code{\link{clearRegistry}()}, -\code{\link{getDefaultRegistry}()}, -\code{\link{loadRegistry}()}, -\code{\link{makeRegistry}()}, -\code{\link{removeRegistry}()}, -\code{\link{sweepRegistry}()}, -\code{\link{syncRegistry}()} +Other Registry: \code{\link{clearRegistry}}, + \code{\link{getDefaultRegistry}}, + \code{\link{loadRegistry}}, \code{\link{makeRegistry}}, + \code{\link{removeRegistry}}, + \code{\link{sweepRegistry}}, \code{\link{syncRegistry}} } \concept{Registry} diff --git a/man/showLog.Rd b/man/showLog.Rd index 8c9c267f..11f8b9f7 100644 --- a/man/showLog.Rd +++ b/man/showLog.Rd @@ -46,12 +46,9 @@ showLog(ids[1], reg = tmp) grepLogs(pattern = "warning", ignore.case = TRUE, reg = tmp) } \seealso{ -Other debug: -\code{\link{getErrorMessages}()}, -\code{\link{getStatus}()}, -\code{\link{grepLogs}()}, -\code{\link{killJobs}()}, -\code{\link{resetJobs}()}, -\code{\link{testJob}()} +Other debug: \code{\link{getErrorMessages}}, + \code{\link{getStatus}}, \code{\link{grepLogs}}, + \code{\link{killJobs}}, \code{\link{resetJobs}}, + \code{\link{testJob}} } \concept{debug} diff --git a/man/submitJobs.Rd b/man/submitJobs.Rd index 041bb842..1081e572 100644 --- a/man/submitJobs.Rd +++ b/man/submitJobs.Rd @@ -4,12 +4,8 @@ \alias{submitJobs} \title{Submit Jobs to the Batch Systems} \usage{ -submitJobs( - ids = NULL, - resources = list(), - sleep = NULL, - reg = getDefaultRegistry() -) +submitJobs(ids = NULL, resources = list(), sleep = NULL, + reg = getDefaultRegistry()) } \arguments{ \item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr diff --git a/man/summarizeExperiments.Rd b/man/summarizeExperiments.Rd index 871612fb..a07431a4 100644 --- a/man/summarizeExperiments.Rd +++ b/man/summarizeExperiments.Rd @@ -4,11 +4,8 @@ \alias{summarizeExperiments} \title{Quick Summary over Experiments} \usage{ -summarizeExperiments( - ids = NULL, - by = c("problem", "algorithm"), - reg = getDefaultRegistry() -) +summarizeExperiments(ids = NULL, by = c("problem", "algorithm"), + reg = getDefaultRegistry()) } \arguments{ \item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr @@ -32,8 +29,7 @@ Returns a frequency table of defined experiments. See \code{\link{ExperimentRegistry}} for an example. } \seealso{ -Other Experiment: -\code{\link{addExperiments}()}, -\code{\link{removeExperiments}()} +Other Experiment: \code{\link{addExperiments}}, + \code{\link{removeExperiments}} } \concept{Experiment} diff --git a/man/sweepRegistry.Rd b/man/sweepRegistry.Rd index 2e301fc6..ba560878 100644 --- a/man/sweepRegistry.Rd +++ b/man/sweepRegistry.Rd @@ -16,13 +16,10 @@ This function checks the registry for consistency and removes obsolete files and redundant data base entries. } \seealso{ -Other Registry: -\code{\link{clearRegistry}()}, -\code{\link{getDefaultRegistry}()}, -\code{\link{loadRegistry}()}, -\code{\link{makeRegistry}()}, -\code{\link{removeRegistry}()}, -\code{\link{saveRegistry}()}, -\code{\link{syncRegistry}()} +Other Registry: \code{\link{clearRegistry}}, + \code{\link{getDefaultRegistry}}, + \code{\link{loadRegistry}}, \code{\link{makeRegistry}}, + \code{\link{removeRegistry}}, \code{\link{saveRegistry}}, + \code{\link{syncRegistry}} } \concept{Registry} diff --git a/man/syncRegistry.Rd b/man/syncRegistry.Rd index e573dd72..bbd86c48 100644 --- a/man/syncRegistry.Rd +++ b/man/syncRegistry.Rd @@ -18,13 +18,10 @@ Parses update files written by the slaves to the file system and updates the internal data base. } \seealso{ -Other Registry: -\code{\link{clearRegistry}()}, -\code{\link{getDefaultRegistry}()}, -\code{\link{loadRegistry}()}, -\code{\link{makeRegistry}()}, -\code{\link{removeRegistry}()}, -\code{\link{saveRegistry}()}, -\code{\link{sweepRegistry}()} +Other Registry: \code{\link{clearRegistry}}, + \code{\link{getDefaultRegistry}}, + \code{\link{loadRegistry}}, \code{\link{makeRegistry}}, + \code{\link{removeRegistry}}, \code{\link{saveRegistry}}, + \code{\link{sweepRegistry}} } \concept{Registry} diff --git a/man/testJob.Rd b/man/testJob.Rd index cd4dbf93..7c471e14 100644 --- a/man/testJob.Rd +++ b/man/testJob.Rd @@ -42,12 +42,9 @@ testJob(2, reg = tmp) } } \seealso{ -Other debug: -\code{\link{getErrorMessages}()}, -\code{\link{getStatus}()}, -\code{\link{grepLogs}()}, -\code{\link{killJobs}()}, -\code{\link{resetJobs}()}, -\code{\link{showLog}()} +Other debug: \code{\link{getErrorMessages}}, + \code{\link{getStatus}}, \code{\link{grepLogs}}, + \code{\link{killJobs}}, \code{\link{resetJobs}}, + \code{\link{showLog}} } \concept{debug} diff --git a/man/waitForJobs.Rd b/man/waitForJobs.Rd index 11527d99..9dae99cc 100644 --- a/man/waitForJobs.Rd +++ b/man/waitForJobs.Rd @@ -4,15 +4,9 @@ \alias{waitForJobs} \title{Wait for Termination of Jobs} \usage{ -waitForJobs( - ids = NULL, - sleep = NULL, - timeout = 604800, - expire.after = NULL, - stop.on.error = FALSE, - stop.on.expire = FALSE, - reg = getDefaultRegistry() -) +waitForJobs(ids = NULL, sleep = NULL, timeout = 604800, + expire.after = NULL, stop.on.error = FALSE, stop.on.expire = FALSE, + reg = getDefaultRegistry()) } \arguments{ \item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr diff --git a/tests/testthat/.Rhistory b/tests/testthat/.Rhistory new file mode 100644 index 00000000..0bd7be19 --- /dev/null +++ b/tests/testthat/.Rhistory @@ -0,0 +1,353 @@ +reticulate::repl_python() +setwd("./software/batchtools/") +library(devtools) +library(devtools) +devtools::document() +remove.packages("batchtools") +library(devtools) +?install_local +getwd() +install_local(".", build_vignettes = F) +library(batchtools) +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +subsample = function(data, job, ratio, ...) { +n = nrow(data) +train = sample(n, floor(n * ratio)) +test = setdiff(seq_len(n), train) +list(test = test, train = train) +} +data("iris", package = "datasets") +addProblem(name = "iris", data = iris, fun = subsample, seed = 42) +library("batchtools") +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +?makeExperimentRegistry +??makeExperimentRegistry +?makeRegistry +??makeRegistry +?addAlgorithm +??addAlgorithm +?install_local +remove.packages("batchtools") +devtools::document() +library(roxygen2) +devtools::document() +getwd() +setwd("../") +devtools::document("./batchtools") +devtools::document("./batchtools") +setwd("./batchtools/") +devtools::document("./batchtools") +devtools::document(".") +library(devtools) +devtools::document(".") +?document +devtools::document(pkg = as.package(".")) +devtools::document(pkg = as.package(".")) +library(batchtools) +getwd() +install_local(".") +library("batchtools") +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +library(batchtools) +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +subsample = function(data, job, ratio, ...) { +n = nrow(data) +train = sample(n, floor(n * ratio)) +test = setdiff(seq_len(n), train) +list(test = test, train = train) +} +data("iris", package = "datasets") +addProblem(name = "iris", data = iris, fun = subsample, seed = 42) +remove.packages("batchtools") +library(devtools) +getwd() +setwd("..") +install_local("./batchtools/", build_vignettes = FALSE) +libray(batchtools) +library(batchtools) +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +library(batchtools) +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +remove.packages("batchtools") +library(devtools) +getwd() +setwd("batchtools") +devtools::load_all() +devtools::document() +setwd("../") +devtools::install_local("./batchtools") +library(devtools) +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +library(devtools) +?makeRegistry +??makeRegistry +getwd() +setwd("batchtools") +remove.packages("batchtools") +library(devtools) +devtools::load_all() +devtools::document() +devtools::install_local(".") +library("batchtools") +reg = makeExperimentRegistry(file.dir = NA, fix.seed = TRUE) +subsample = function(data, job, ratio, ...) { +n = nrow(data) +train = sample(n, floor(n * ratio)) +test = setdiff(seq_len(n), train) +list(test = test, train = train) +} +data("iris", package = "datasets") +addProblem(name = "iris", data = iris, fun = subsample, seed = 42) +svm.wrapper = function(data, job, instance, ...) { +library("e1071") +mod = svm(Species ~ ., data = data[instance$train, ], ...) +pred = predict(mod, newdata = data[instance$test, ], type = "class") +table(data$Species[instance$test], pred) +} +addAlgorithm(name = "svm", fun = svm.wrapper) +forest.wrapper = function(data, job, instance, ...) { +library("ranger") +mod = ranger(Species ~ ., data = data[instance$train, ], write.forest = TRUE) +pred = predict(mod, data = data[instance$test, ]) +table(data$Species[instance$test], pred$predictions) +} +addAlgorithm(name = "forest", fun = forest.wrapper) +# problem design: try two values for the ratio parameter +pdes = list(iris = data.table(ratio = c(0.67, 0.9))) +# algorithm design: try combinations of kernel and epsilon exhaustively, +# try different number of trees for the forest +ades = list( +svm = CJ(kernel = c("linear", "polynomial", "radial"), epsilon = c(0.01, 0.1)), +forest = data.table(ntree = c(100, 500, 1000)) +) +addExperiments(pdes, ades, repls = 5) +id1 = head(findExperiments(algo.name = "svm"), 1) +print(id1) +id2 = head(findExperiments(algo.name = "forest", algo.pars = (ntree == 1000)), 1) +print(id2) +walltime = "00:01:00" +memory = "1gb" +ncpus = 1 +testJob(id = id1, reg = reg) +testJob(id = id2) +?load_all +?devtools::load_all +?makeRegistry +?with_seed +runif(1) +?runif +p1 = runif(1) +# setting R_TESTS to empty string because of +# https://github.com/hadley/testthat/issues/144 +# revert this when that issue in R is fixed. +Sys.setenv("R_TESTS" = "") +library(testthat) +library(batchtools) +test_check("batchtools") +getwd() +setwd("./test") +setwd("./tests/") +# setting R_TESTS to empty string because of +# https://github.com/hadley/testthat/issues/144 +# revert this when that issue in R is fixed. +Sys.setenv("R_TESTS" = "") +library(testthat) +library(batchtools) +test_check("batchtools") +?JobCollection +?getJob +??getJob.JobCollection +?JobCollection +tmp = makeRegistry(file.dir = NA, make.default = FALSE, packages = "methods") +batchMap(identity, 1:5, reg = tmp) +jc = makeJobCollection(1:3, resources = list(foo = "bar"), reg = tmp) +jc +jc$jobs +jc$jobs[1] +j=jc$jobs[1] +j$job.pars +j$job.id +ls(jc) +jc$resources +?ExperimentCollection +??ExperimentCollection +# setting R_TESTS to empty string because of +# https://github.com/hadley/testthat/issues/144 +# revert this when that issue in R is fixed. +Sys.setenv("R_TESTS" = "") +library(testthat) +library(batchtools) +test_check("batchtools") +getwd() +setwd("..") +remove.packages("batchtools") +library(devtools) +devtools::load_all() +devtools::document() +setwd("../") +library(devtools) +getwd() +setwd("./batchtools") +devtools::load_all() +devtools::document() +devtools::install_local(".") +getwd() +setwd("./tes") +setwd("./tests/") +# setting R_TESTS to empty string because of +# https://github.com/hadley/testthat/issues/144 +# revert this when that issue in R is fixed. +Sys.setenv("R_TESTS" = "") +library(testthat) +library(batchtools) +test_check("batchtools") +reg = makeTestRegistry(seed = 1) +batchMap(function(x, .job) list(seed = .job$seed), x = 1:3, reg = reg) +submitAndWait(reg) +getwd() +setwd("./testthat/") +source("helper.R") +reg = makeTestRegistry(seed = 1) +batchMap(function(x, .job) list(seed = .job$seed), x = 1:3, reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +expect_data_table(res, nrow = 3, ncol = 2) +expect_identical(res$seed, 2:4) +expect_true(any(stri_detect_fixed(getLog(1, reg = reg), "Setting seed to 2"))) +expect_true(any(stri_detect_fixed(getLog(2, reg = reg), "Setting seed to 3"))) +expect_true(any(stri_detect_fixed(getLog(3, reg = reg), "Setting seed to 4"))) +reg = makeTestExperimentRegistry(seed = 1) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +Job +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +getStatus(reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +expect_identical(res$instance, 2:3) +expect_identical(res$seed, 2:3) +reg = makeTestExperimentRegistry(seed = 1, fix.seed = TRUE) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +getStatus(reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +reg = makeTestRegistry(seed = 1, fix.seed = TRUE) +batchMap(function(x, .job) list(seed = .job$seed), x = 1:3, reg = reg) +reg$fix.seed +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +expect_data_table(res, nrow = 3, ncol = 2) +expect_identical(res$seed, 1) +expect_identical(res$seed, rep(1, 3)) +rep(1,2) +rep(1,2) +rep(1,3) +rep.int(1,3) +expect_identical(res$seed, rep.int(1, 3)) +res$seed +expect_identical(res$seed, 1:3) +expect_identical(res$seed, c(1,1,1)) +expect_identical(res$seed, list(1,1,1)) +expect_identical(res$seed, int(1,1,1)) +typeof(res$seed) +g = rep.int(1,3) +typeof(g) +g = rep.int(1L,3) +typeof(g) +expect_identical(res$seed, rep.int(1L,3)) +any(stri_detect_fixed(getLog(1, reg = reg), "Setting seed to 2")) +any(stri_detect_fixed(getLog(1, reg = reg), "Setting seed to 1")) +reg = makeTestExperimentRegistry(seed = 1) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +getStatus(reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +reg = makeTestExperimentRegistry(seed = 1, fix.seed = TRUE) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +getStatus(reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +res = unwrap(reduceResultsDataTable(reg = reg)) +expect_data_table(res, nrow = 2, ncol = 3) +expect_identical(res$instance, 2:3) +expect_identical(res$seed, rep.int(1L, 3)) +res$seed +res = unwrap(reduceResultsDataTable(reg = reg)) +expect_data_table(res, nrow = 2, ncol = 3) +expect_identical(res$instance, 2:3) +expect_identical(res$seed, rep.int(1L, 2)) +res$instance +reg = makeTestExperimentRegistry(seed = 1, fix.seed = TRUE) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +getStatus(reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +?addAlgorithm +??addAlgorithm +reg +reg$defs +reg$defs$problem +reg$defs$problem[1] +reg$defs$prob.pars +reg$defs$prob.pars[[1]] +reg = makeTestRegistry(seed = 1) +batchMap(function(x, .job) list(seed = .job$seed), x = 1:3, reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +expect_data_table(res, nrow = 3, ncol = 2) +expect_identical(res$seed, 2:4) +expect_true(any(stri_detect_fixed(getLog(1, reg = reg), "Setting seed to 2"))) +expect_true(any(stri_detect_fixed(getLog(2, reg = reg), "Setting seed to 3"))) +expect_true(any(stri_detect_fixed(getLog(3, reg = reg), "Setting seed to 4"))) +reg = makeTestExperimentRegistry(seed = 1) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +getStatus(reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +reg = makeTestExperimentRegistry(seed = 1) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +reg +reg$fix.seed +reg$problems +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +ids +reg$algorithms +reg$defs +reg$defs[1]$algo.pars +reg$defs[1]$prob.pars +getStatus(reg = reg) +submitAndWait(reg) +res = unwrap(reduceResultsDataTable(reg = reg)) +res +reg$fix.seed +reg = makeTestExperimentRegistry(seed = 1, fix.seed = TRUE) +addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) +reg$problems +addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) +ids = addExperiments(repls = 2, reg = reg) +getStatus(reg = reg) +submitAndWait(reg) +reg +reg +reg$problems +res = unwrap(reduceResultsDataTable(reg = reg)) +res diff --git a/tests/testthat/test_seed.R b/tests/testthat/test_seed.R index 18b09eab..7b952b43 100644 --- a/tests/testthat/test_seed.R +++ b/tests/testthat/test_seed.R @@ -58,6 +58,74 @@ test_that("Problem and Algorithm seed", { expect_numeric(results$res, unique = TRUE) }) +test_that("Problem and Algorithm fix seed", { + reg = makeTestExperimentRegistry(seed = 42, fix.seed = TRUE) + addProblem(reg = reg, "p1", data = iris, fun = function(job, data, ...) runif(1), seed = 1L) + addProblem(reg = reg, "p2", data = iris, fun = function(job, data, ...) runif(1), fix.seed = TRUE) + addProblem(reg = reg, "p3", data = iris, fun = function(job, data, ...) runif(1), seed = 24, fix.seed = TRUE) + addProblem(reg = reg, "p4", data = iris, fun = function(job, data, ...) runif(1)) + addAlgorithm(reg = reg, "a1", fun = function(job, data, instance, ...) list(instance = instance, res = runif(1))) + addAlgorithm(reg = reg, "a2", fun = function(job, data, instance, ...) list(instance = instance, res = runif(1))) + prob.designs = list(p1 = data.table(), p2 = data.table(), p3 = data.table(), p4 = data.table()) + algo.designs = list(a1 = data.table(), a2 = data.table()) + repls = 3 + ids = addExperiments(prob.designs, algo.designs, repls = repls, reg = reg) + + submitAndWait(reg, ids) + + set.seed(1); p1 = runif(1) + set.seed(2); p2 = runif(1) + set.seed(3); p3 = runif(1) + set.seed(24); p4 = runif(1); + set.seed(42); a = runif(1) + silent({ + ids = findExperiments(algo.name = "a1", prob.name = "p1", reg = reg) + results = rbindlist(reduceResultsList(ids, reg = reg), use.names = TRUE) + }) + expect_true(all(results$instance == c(p1, p2, p3))) + expect_true(all(results$res == rep.int(a, repls))) + + silent({ + ids = findExperiments(prob.name = "p2", reg = reg) + results = rbindlist(reduceResultsList(ids, reg = reg), use.names = TRUE) + }) + expect_true(all(results$instance == rep.int(a, repls * 2))) + expect_true(all(results$res == rep.int(a, repls * 2))) + + silent({ + ids = findExperiments(prob.name = "p3", reg = reg) + results = rbindlist(reduceResultsList(ids, reg = reg), use.names = TRUE) + }) + expect_true(all(results$instance == rep.int(p4, repls * 2))) + + silent({ + ids1 = findExperiments(algo.name = "a1", prob.name = "p4", reg = reg) + results1 = rbindlist(reduceResultsList(ids1, reg = reg), use.names = TRUE) + }) + silent({ + ids2 = findExperiments(algo.name = "a2", prob.name = "p4", reg = reg) + results2 = rbindlist(reduceResultsList(ids2, reg = reg), use.names = TRUE) + }) + expect_true(all(results1$instance == results2$instance)) + + + reg = makeTestExperimentRegistry(seed = 42) + addProblem(reg = reg, "p1", data = iris, fun = function(job, data, ...) runif(1), seed = 1L, fix.seed = TRUE) + addAlgorithm(reg = reg, "a1", fun = function(job, data, instance, ...) list(instance = instance, res = runif(1))) + prob.designs = list(p1 = data.table()) + algo.designs = list(a1 = data.table()) + repls = 3 + ids = addExperiments(prob.designs, algo.designs, repls = repls, reg = reg) + + submitAndWait(reg, ids) + + silent({ + ids = findExperiments(prob.name = "p1", reg = reg) + results = rbindlist(reduceResultsList(ids, reg = reg), use.names = TRUE) + }) + expect_true(all(results$instance == rep.int(p1, repls))) +}) + test_that("Seed is correctly reported (#203)", { reg = makeTestRegistry(seed = 1) batchMap(function(x, .job) list(seed = .job$seed), x = 1:3, reg = reg) @@ -85,4 +153,33 @@ test_that("Seed is correctly reported (#203)", { expect_true(any(stri_detect_fixed(getLog(1, reg = reg), "seed = 2"))) expect_true(any(stri_detect_fixed(getLog(2, reg = reg), "seed = 3"))) + + + reg = makeTestRegistry(seed = 1, fix.seed = TRUE) + batchMap(function(x, .job) list(seed = .job$seed), x = 1:3, reg = reg) + submitAndWait(reg) + res = unwrap(reduceResultsDataTable(reg = reg)) + expect_data_table(res, nrow = 3, ncol = 2) + expect_identical(res$seed, rep.int(1L, 3)) + + expect_true(any(stri_detect_fixed(getLog(1, reg = reg), "Setting seed to 1"))) + expect_true(any(stri_detect_fixed(getLog(2, reg = reg), "Setting seed to 1"))) + expect_true(any(stri_detect_fixed(getLog(3, reg = reg), "Setting seed to 1"))) + + + reg = makeTestExperimentRegistry(seed = 1, fix.seed = TRUE) + addProblem(reg = reg, "p1", fun = function(job, ...) job$seed, seed = 100L) + addAlgorithm(reg = reg, "a1", fun = function(job, instance, ...) list(instance = instance, seed = job$seed)) + ids = addExperiments(repls = 2, reg = reg) + getStatus(reg = reg) + submitAndWait(reg) + + res = unwrap(reduceResultsDataTable(reg = reg)) + expect_data_table(res, nrow = 2, ncol = 3) + expect_identical(res$instance, rep.int(1L, 2)) + expect_identical(res$seed, rep.int(1L, 2)) + + expect_true(any(stri_detect_fixed(getLog(1, reg = reg), "seed = 1"))) + expect_true(any(stri_detect_fixed(getLog(2, reg = reg), "seed = 1"))) + })