openfl.callbacks.CallbackList#
- class openfl.callbacks.CallbackList(callbacks, add_memory_profiler=False, add_metric_writer=False, tensor_db=None, **params)[source]#
An ensemble of callbacks.
This class allows multiple callbacks to be used together, by sequentially calling each callback’s respective methods.
- Parameters:
callbacks (list)
- callbacks#
A list of openfl.callbacks.Callback instances.
- add_memory_profiler#
If True, adds a MemoryProfiler callback to the list.
- add_metric_writer#
If True, adds a MetricWriter callback to the list.
- tensor_db#
Optional TensorDB instance of the respective participant. If provided, callbacks can access TensorDB for various actions.
- params#
Additional parameters saved for use within the callbacks.
- __init__(callbacks, add_memory_profiler=False, add_metric_writer=False, tensor_db=None, **params)[source]#
- Parameters:
callbacks (list)
Methods
__init__(callbacks[, add_memory_profiler, ...])on_experiment_begin([logs])Callback function to be executed at the beginning of an experiment.
on_experiment_end([logs])Callback function to be executed at the end of an experiment.
on_round_begin(round_num[, logs])Callback function to be executed at the beginning of a round.
on_round_end(round_num[, logs])Callback function to be executed at the end of a round.
on_task_begin(task_name, round_num[, logs])Callback function to be executed at the beginning of a task.
on_task_end(task_name, round_num[, logs])Callback function to be executed at the end of a task.
set_params(params)set_tensor_db(tensor_db)