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

Class Callback

tests/python/test_basic.py:253–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by 1