MCPcopy Create free account
hub / github.com/dmlc/xgboost / Cb2

Class Cb2

tests/python/test_callback.py:390–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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:

Callers 1

test_preserve_orderMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_preserve_orderMethod · 0.68