From 350d43754f402fa7b1ba0c4b6668abbc84c496b6 Mon Sep 17 00:00:00 2001 From: be-marc Date: Wed, 6 Nov 2024 16:05:50 +0100 Subject: [PATCH] ... --- R/ContextBatch.R | 2 +- man/ContextBatch.Rd | 2 +- man/callback_async.Rd | 16 +++++++++++----- man/callback_batch.Rd | 19 ++++++++++++------- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/R/ContextBatch.R b/R/ContextBatch.R index 494f88b0..97096d5a 100644 --- a/R/ContextBatch.R +++ b/R/ContextBatch.R @@ -50,7 +50,7 @@ ContextBatch = R6Class("ContextBatch", } }, - #' @field result_y ([numeric(1)])\cr + #' @field result_y (`numeric(1)`)\cr #' The y passed to `instance$assign_result()`. #' Only available for single criterion optimization. result_y = function(rhs) { diff --git a/man/ContextBatch.Rd b/man/ContextBatch.Rd index 76f7ef5b..f7b28389 100644 --- a/man/ContextBatch.Rd +++ b/man/ContextBatch.Rd @@ -30,7 +30,7 @@ Contains the values in the search space i.e. transformations are not yet applied \item{\code{result_xdt}}{(\link[data.table:data.table]{data.table::data.table})\cr The xdt passed to \code{instance$assign_result()}.} -\item{\code{result_y}}{(\link{numeric(1)})\cr +\item{\code{result_y}}{(\code{numeric(1)})\cr The y passed to \code{instance$assign_result()}. Only available for single criterion optimization.} diff --git a/man/callback_async.Rd b/man/callback_async.Rd index 438dd9e7..65bcca59 100644 --- a/man/callback_async.Rd +++ b/man/callback_async.Rd @@ -43,12 +43,15 @@ The functions must have two arguments named \code{callback} and \code{context}.} \item{on_optimizer_before_eval}{(\verb{function()})\cr Stage called after the optimizer proposes points. Called in \code{OptimInstance$.eval_point()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The argument of \code{instance$.eval_point(xs)} and \code{xs_trafoed} and \code{extra} are available in the \code{context}. +Or \code{xs} and \code{xs_trafoed} of \code{instance$.eval_queue()} are available in the \code{context}.} \item{on_optimizer_after_eval}{(\verb{function()})\cr Stage called after points are evaluated. Called in \code{OptimInstance$.eval_point()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The outcome \code{y} is available in the \code{context}.} \item{on_worker_end}{(\verb{function()})\cr Stage called at the end of the optimization on the worker. @@ -58,15 +61,18 @@ The functions must have two arguments named \code{callback} and \code{context}.} \item{on_result_begin}{(\verb{function()})\cr Stage called before result are written. Called in \code{OptimInstance$assign_result()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The arguments of \verb{$.assign_result(xdt, y, extra)} are available in the \code{context}.} \item{on_result_end}{(\verb{function()})\cr Stage called after result are written. Called in \code{OptimInstance$assign_result()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The final result \code{instance$result} is available in the \code{context}.} \item{on_result}{(\verb{function()})\cr -Deprecated. Use \code{on_result_end} instead. +Deprecated. +Use \code{on_result_end} instead. Stage called after result are written. Called in \code{OptimInstance$assign_result()}. The functions must have two arguments named \code{callback} and \code{context}.} diff --git a/man/callback_batch.Rd b/man/callback_batch.Rd index 41a3caac..d4855788 100644 --- a/man/callback_batch.Rd +++ b/man/callback_batch.Rd @@ -36,25 +36,30 @@ The functions must have two arguments named \code{callback} and \code{context}.} \item{on_optimizer_before_eval}{(\verb{function()})\cr Stage called after the optimizer proposes points. Called in \code{OptimInstance$eval_batch()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The argument of \verb{$eval_batch(xdt)} is available in \code{context}.} \item{on_optimizer_after_eval}{(\verb{function()})\cr Stage called after points are evaluated. Called in \code{OptimInstance$eval_batch()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The new points and outcomes in \code{instance$archive} are available in \code{context}.} \item{on_result_begin}{(\verb{function()})\cr -Stage called before result are written. +Stage called before result are written to the instance. Called in \code{OptimInstance$assign_result()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The arguments of \verb{$assign_result(xdt, y, extra)} are available in \code{context}.} \item{on_result_end}{(\verb{function()})\cr -Stage called after result are written. +Stage called after result are written to the instance. Called in \code{OptimInstance$assign_result()}. -The functions must have two arguments named \code{callback} and \code{context}.} +The functions must have two arguments named \code{callback} and \code{context}. +The final result \code{instance$result} is available in \code{context}.} \item{on_result}{(\verb{function()})\cr -Deprecated. Use \code{on_result_end} instead. +Deprecated. +Use \code{on_result_end} instead. Stage called after result are written. Called in \code{OptimInstance$assign_result()}. The functions must have two arguments named \code{callback} and \code{context}.}