Instrument the model building process using built-in and custom callbacks
model.build()
process.
This is useful for logging, monitoring, custom artifact handling, or triggering external processes.
plexe.Callback
and implement one or more of the following methods:
on_build_start(info: BuildStateInfo)
: Called once at the beginning of the build
process.on_build_end(info: BuildStateInfo)
: Called once at the end of the build
process (after success or error).on_iteration_start(info: BuildStateInfo)
: Called at the start of each model building iteration (solution attempt).on_iteration_end(info: BuildStateInfo)
: Called at the end of each model building iteration.BuildStateInfo
object passed to these methods contains contextual information like the model intent, provider used, schemas, datasets, current iteration number, and the current solution Node
being evaluated (especially relevant in on_iteration_end
).
MLFlowCallback
pip install mlflow
MLFlowCallback
logs:trainer_source.py
), model artifacts saved by the training script.plexe.Callback
.
Example: A simple callback to print iteration progress.