Skip to contents

Ephemeral context passed from OptimizerAL to ALProposer objects for a single outer proposal round.

The context keeps shallow references to the optimizer's canonical surrogate and acquisition-function registries. Access should go through $get_surrogate() and $get_acq(), because these methods implement lazy model updates, lazy acquisition-function fitting, and proposer-local pending-point filtering.

Creates a new active-learning context.

Adds points selected for the current proposal batch.

Lazily updates and returns a canonical surrogate.

Lazily wires, fits, updates, and returns an acquisition function.

Creates a fresh acquisition-function working object.

Arguments

instance

(bbotk::EvalInstance)
Search or optimization instance.

surrogates

(named list() of mlr3mbo::Surrogate)
Canonical run-local surrogate objects.

acq_functions

(named list() of mlr3mbo::AcqFunction)
Unwired acquisition-function prototypes.

run_state

(list())
Run-local mutable state shared across proposal rounds.

optimizer

(NULL | OptimizerAL)
Optimizer that owns the canonical surrogate registry. If supplied, surrogate access is routed through the optimizer's fit cache.

allow_repeat_evaluations

(logical(1))
Whether to allow repeat evaluations of the same point.

xdt

(data.table)
Points selected in the current proposal round.

id

(character(1))
Surrogate registry id.

surrogate_id

(character(1))
Surrogate registry id.

clone

(logical(1))
Whether to return a fresh working clone.

acq_id

(character(1))
Acquisition-function registry id.

surrogate

(mlr3mbo::Surrogate)
Surrogate to wire into the acquisition function.

fit_scope

(character(1))
Either "global", "candidate", or "search_space". "global" falls back to "search_space" when the run has no finite pool.

pool

(NULL | data.table)
Candidate pool for candidate-scope fitting.

Fields

instance

(bbotk::EvalInstance)
Search or optimization instance.

pending_xdt

(data.table) Points already selected during the current proposal round.

proposable_xdt

(NULL | data.table) Candidates that can still be proposed. NULL for continuous contexts without pool. These are all unevaluated points that are not pending when allow_repeat_evaluations is FALSE; otherwise, these are all points that are not pending.

evaluated_and_pending_xdt

(data.table) Points that have been evaluated or are pending evaluation.