1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/JobTables.R
\name{getJobTable}
\alias{getJobTable}
\alias{getJobStatus}
\alias{getJobResources}
\alias{getJobPars}
\alias{getJobTags}
\title{Query Job Information}
\usage{
getJobTable(ids = NULL, reg = getDefaultRegistry())
getJobStatus(ids = NULL, reg = getDefaultRegistry())
getJobResources(ids = NULL, reg = getDefaultRegistry())
getJobPars(ids = NULL, reg = getDefaultRegistry())
getJobTags(ids = NULL, reg = getDefaultRegistry())
}
\arguments{
\item{ids}{[\code{\link[base]{data.frame}} or \code{integer}]\cr
A \code{\link[base]{data.frame}} (or \code{\link[data.table]{data.table}})
with a column named \dQuote{job.id}.
Alternatively, you may also pass a vector of integerish job ids.
If not set, defaults to all jobs.
Invalid ids are ignored.}
\item{reg}{[\code{\link{Registry}}]\cr
Registry. If not explicitly passed, uses the default registry (see \code{\link{setDefaultRegistry}}).}
}
\value{
[\code{\link{data.table}}] with the following columns (not necessarily in this order):
\describe{
\item{job.id}{Unique Job ID as integer.}
\item{submitted}{Time the job was submitted to the batch system as \code{\link[base]{POSIXct}}.}
\item{started}{Time the job was started on the batch system as \code{\link[base]{POSIXct}}.}
\item{done}{Time the job terminated (successfully or with an error) as \code{\link[base]{POSIXct}}.}
\item{error}{Either \code{NA} if the job terminated successfully or the error message.}
\item{mem.used}{Estimate of the memory usage.}
\item{batch.id}{Batch ID as reported by the scheduler.}
\item{log.file}{Log file. If missing, defaults to \code{[job.hash].log}.}
\item{job.hash}{Unique string identifying the job or chunk.}
\item{time.queued}{Time in seconds (as \code{\link[base]{difftime}}) the job was queued.}
\item{time.running}{Time in seconds (as \code{\link[base]{difftime}}) the job was running.}
\item{pars}{List of parameters/arguments for this job.}
\item{resources}{List of computational resources set for this job.}
\item{tags}{Tags as joined string, delimited by \dQuote{,}.}
\item{problem}{Only for \code{\link{ExperimentRegistry}}: the problem identifier.}
\item{algorithm}{Only for \code{\link{ExperimentRegistry}}: the algorithm identifier.}
}
}
\description{
\code{getJobStatus} returns the internal table which stores information about the computational
status of jobs, \code{getJobPars} a table with the job parameters, \code{getJobResources} a table
with the resources which were set to submit the jobs, and \code{getJobTags} the tags of the jobs
(see \link{Tags}).
\code{getJobTable} returns all these tables joined.
}
\examples{
\dontshow{ batchtools:::example_push_temp(1) }
tmp = makeRegistry(file.dir = NA, make.default = FALSE)
f = function(x) if (x < 0) stop("x must be > 0") else sqrt(x)
batchMap(f, x = c(-1, 0, 1), reg = tmp)
submitJobs(reg = tmp)
waitForJobs(reg = tmp)
addJobTags(1:2, "tag1", reg = tmp)
addJobTags(2, "tag2", reg = tmp)
# Complete table:
getJobTable(reg = tmp)
# Job parameters:
getJobPars(reg = tmp)
# Set and retrieve tags:
getJobTags(reg = tmp)
# Job parameters with tags right-joined:
rjoin(getJobPars(reg = tmp), getJobTags(reg = tmp))
}
|