on_optimization_end#
- JSONLogger.on_optimization_end(success: bool, final_fom: float, final_params: ndarray, num_iterations: int, **kwargs) None#
Flush the in-memory history to disk as a JSON document.
I/O errors are caught and logged via the module logger; they cannot bring down the surrounding optimization.
- Parameters:
- successbool
Whether optimization succeeded.
- final_fom
float Final FOM value.
- final_params
np.ndarray Final parameter values (currently captured in
param_history[-1]rather than as a separate top-level key).- num_iterations
int Number of iterations completed.
- **kwargs
Additional information.
initial_fom(if provided) is used to compute and persist the absolute and relative improvement.