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

Method get_callbacks

python-package/xgboost/core.py:356–365  ·  view source on GitHub ↗

Get callback functions for iterating in C. This is an internal function.

(self, enable_categorical: bool)

Source from the content-addressed store, hash-verified

354 self._data_ref: Optional[weakref.ReferenceType] = None
355
356 def get_callbacks(self, enable_categorical: bool) -> Tuple[Callable, Callable]:
357 """Get callback functions for iterating in C. This is an internal function."""
358 assert hasattr(self, "cache_prefix"), "__init__ is not called."
359 reset_callback = ctypes.CFUNCTYPE(None, ctypes.c_void_p)(self._reset_wrapper)
360 next_callback = ctypes.CFUNCTYPE(
361 ctypes.c_int,
362 ctypes.c_void_p,
363 )(self._next_wrapper)
364 self._enable_categorical = enable_categorical
365 return reset_callback, next_callback
366
367 @property
368 def proxy(self) -> "_ProxyDMatrix":

Callers 3

_init_from_iterMethod · 0.80
_initMethod · 0.80
_initMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected