| 388 | # If we use Python `set`, Cb1 is ordered before Cb2. This test makes sure Cb2 is |
| 389 | # called before Cb1. |
| 390 | class Cb2(xgb.callback.TrainingCallback): |
| 391 | def before_iteration(self, model, epoch: int, evals_log) -> bool: |
| 392 | nonlocal fst_call |
| 393 | assert fst_call is None or fst_call == 2 |
| 394 | fst_call = 2 |
| 395 | return False |
| 396 | |
| 397 | class Cb1(xgb.callback.TrainingCallback): |
| 398 | def before_iteration(self, model, epoch: int, evals_log) -> bool: |
no outgoing calls