コールバック#
イベント#
Base class for all callback events. |
|
Fired once when the optimization run starts. |
|
Fired once when the optimization run ends. |
|
Fired after initial sampling, before initial archive evaluation. |
|
Fired after initial archive evaluation, before archive sorting. |
|
Fired at the beginning of each generation. |
|
Fired at the end of each generation, before yielding the context. |
|
Fired before surrogate-based candidate scoring. |
|
Fired after surrogate-based candidate scoring. |
|
Fired before acquisition scoring, inside |
|
Fired after acquisition scoring succeeds, inside |
|
Fired after crossover and repair. |
|
Fired after mutation and repair. |
|
Fired after the full ask step (post crossover and mutation). |
|
Fired after the surrogate model is fitted. |
|
Fired after true evaluation of selected candidates. |
コールバックマネージャー#
Manages event handlers. |
組み込みハンドラー#
- saealib.logging_generation(event)[ソース]#
Log the state at the start of each generation.
For single-objective problems, logs the best objective value determined by the comparator. For multi-objective problems, logs the size of the first Pareto front and the per-objective value ranges of that front.
- パラメータ:
event (GenerationStartEvent) -- The generation-start event.
- 戻り値の型:
None
- saealib.logging_generation_hv(reference_point)[ソース]#
Return a handler that logs the hypervolume per generation.
Computes the hypervolume of the first Pareto front in the archive with respect to the given reference point (minimization convention).
- パラメータ:
reference_point (np.ndarray) -- Reference (nadir) point, shape (n_obj,). Each component should be strictly greater than the best achievable value per objective.
- 戻り値:
A handler compatible with
CallbackManager.register.- 戻り値の型:
Callable[[GenerationStartEvent], None]
サンプル
>>> optimizer.cbmanager.register( ... GenerationStartEvent, ... logging_generation_hv(np.array([1.1, 1.1])) ... )
チェックポイント保存#
Callback that saves checkpoints at regular generation intervals. |