nvflare.app_opt.xgboost.metrics_cb module
- class MetricsCallback(writer: LogWriter)[source]
Bases:
TrainingCallback- after_iteration(model, epoch: int, evals_log: Dict[str, Dict[str, List[float] | List[Tuple[float, float]]]])[source]
Run after each iteration. Returns True when training should stop.
- Parameters:
model – Eeither a
Boosterobject or a CVPack if the cv function in xgboost is being used.epoch – The current training iteration.
evals_log –
A dictionary containing the evaluation history:
{"data_name": {"metric_name": [0.5, ...]}}