Kernel
Kernel#
- class liesel.goose.types.Kernel(*args, **kwargs)[source]#
Bases:
Protocol
[liesel.goose.types.TKernelState
,liesel.goose.types.TTransitionInfo
,liesel.goose.types.TTuningInfo
]Protocol for a transition kernel.
Methods
end_epoch
(prng_key, kernel_state, ...)Called at the end of an epoch.
end_warmup
(prng_key, kernel_state, ...)Asks the kernel to inspect the warmup history and react to it.
Whether the model interface is set.
init_state
(prng_key, model_state)Creates the initial kernel state.
set_model
(model)Sets the model interface.
start_epoch
(prng_key, kernel_state, ...)Called at the beginning of an epoch.
transition
(prng_key, kernel_state, ...)Handles one transition.
tune
(prng_key, kernel_state, model_state, ...)The method can perform automatic tuning of the kernel and is called after each adaptation epoch.
Attributes
An identifier for the kernel object that is set by the EngineBuilder if it is an empty string.
Is set to true if the kernel expects the history for tuning.
Maps error codes to error messages.
Keys for which the kernel handles the transition.