| 251 | |
| 252 | # Use callback to log the test labels in each fold |
| 253 | class Callback(xgb.callback.TrainingCallback): |
| 254 | def __init__(self) -> None: |
| 255 | super().__init__() |
| 256 | |
| 257 | def after_iteration( |
| 258 | self, |
| 259 | model, |
| 260 | epoch: int, |
| 261 | evals_log: xgb.callback.TrainingCallback.EvalsLog, |
| 262 | ): |
| 263 | print([fold.dtest.get_label() for fold in model.cvfolds]) |
| 264 | |
| 265 | cb = Callback() |
| 266 |
no outgoing calls